/* スライダー認証スタイル - レスポンシブデザイン */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
}

.verification-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 32px;
    text-align: center;
    transition: transform 0.3s ease;
}

.verification-card:hover {
    transform: translateY(-2px);
}

.card-header h2 {
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-header p {
    color: #718096;
    font-size: 14px;
    margin-bottom: 32px;
}

.slider-container {
    position: relative;
    margin-bottom: 24px;
}

.slider-track {
    width: 100%;
    height: 48px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.slider-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 22px;
    width: 0;
    transition: none;
}

.slider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    transition: none;
}

.slider-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: none;
    z-index: 10;
    will-change: transform, left;
}

.slider-handle:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.slider-handle svg {
    color: #4a5568;
    transition: color 0.3s ease;
}

.puzzle-container {
    margin-bottom: 24px;
}

.puzzle-bg {
    width: 100%;
    height: 160px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.captcha-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.puzzle-gap {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.puzzle-piece {
    position: absolute;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    overflow: hidden;
    transition: none;
    top: 0;
    left: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.puzzle-piece-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像がコンテナに適応するように */
    display: block;
}

.status-message {
    min-height: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-message.success {
    color: #38a169;
}

.status-message.error {
    color: #e53e3e;
}

.status-message.loading {
    color: #4299e1;
}

/* アニメーション効果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: success 0.6s ease-in-out;
}

/* モバイル適応 */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .verification-card {
        padding: 24px;
    }
    
    .card-header h2 {
        font-size: 20px;
    }
    
    .slider-track {
        height: 44px;
    }
    
    .slider-handle {
        width: 40px;
        height: 40px;
    }
    
    .puzzle-bg {
        height: 100%;
    }
}

/* タッチデバイスの最適化 */
@media (hover: none) and (pointer: coarse) {
    .slider-handle {
        width: 48px;
        height: 48px;
    }
    
    .slider-track {
        height: 52px;
    }
}

/* リフレッシュボタンのスタイル */
.refresh-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
    padding: 0;
    outline: none;
}

.refresh-button:hover {
    background: white;
    transform: rotate(30deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.refresh-button svg {
    color: #4a5568;
}

/* 所要時間表示のスタイル */
.status-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 24px;
    margin-top: 16px;
}

.status-message {
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
}

.elapsed-time {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    min-width: 60px;
    text-align: right;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.refreshing {
    animation: rotate 1s linear infinite;
}
