/* Tailwindcssはindex.htmlで読み込み済み */

@layer components {
    .app-gradient { 
        background: var(--primary-gradient); 
    }
    
    .glass-card { 
        background: rgba(255, 255, 255, 0.9); 
        backdrop-filter: blur(10px); 
    }
    
    .btn-bounce {
        transition: all 0.2s ease-in-out;
    }
    
    .btn-bounce:active { 
        transform: scale(0.95); 
    }
    
    /* レッスン開始ボタンを周りと同化させない */
    .bg-primary {
        box-shadow: 0 8px 24px -8px rgba(79, 70, 229, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
        position: relative;
        overflow: hidden;
    }
    
    .bg-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
        pointer-events: none;
    }
    
    .bg-primary:hover {
        box-shadow: 0 12px 32px -6px rgba(79, 70, 229, 0.4);
        transform: translateY(-2px);
    }
    
    .bg-primary:active {
        transform: scale(0.95) translateY(0);
    }
    
    .page-fade { 
        animation: fadeIn 0.3s ease-in-out; 
    }

    
    .flip-card { 
        perspective: 1000px; 
    }
    
    .flip-card-inner { 
        transition: transform 0.6s; 
        transform-style: preserve-3d; 
    }
    
    .flipped { 
        transform: rotateY(180deg); 
    }
    
    .flip-card-front, .flip-card-back { 
        backface-visibility: hidden; 
        position: absolute; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
    }
    
    .flip-card-back { 
        transform: rotateY(180deg); 
    }

    .custom-scrollbar::-webkit-scrollbar { 
        width: 6px; 
    }
    
    .custom-scrollbar::-webkit-scrollbar-track { 
        background: transparent; 
    }
    
    .custom-scrollbar::-webkit-scrollbar-thumb { 
        background: #e2e8f0; 
        border-radius: 10px; 
    }
}

.site-links {
    position: fixed;
    bottom: 92px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 60;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(14px);
    padding: 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
    max-width: calc(100vw - 32px);
    min-width: 220px;
}

.site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.9rem 1.1rem;
    border-radius: 9999px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.96rem;
    min-width: 180px;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
}

.site:hover {
    transform: translateY(-2px);
    background-color: rgba(79, 70, 229, 0.95);
}

.site:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .site-links {
        left: 50%;
        right: auto;
        bottom: 18px;
        transform: translateX(-50%);
        width: min(92vw, 560px);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding: 0.75rem;
    }

    .site {
        min-width: 140px;
        width: calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .site-links {
        width: min(96vw, 420px);
    }

    .site {
        width: 100%;
    }
}