/* ============================================
   Index/Home Page Styles
   ============================================ */

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 600px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
}

.subtitle {
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1em;
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.feature {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 8px;
}

.feature p {
    color: #666;
    font-size: 0.9em;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.nav-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #999;
}

.nav-footer a {
    color: #667eea;
    text-decoration: none;
    margin-left: 10px;
}

.nav-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Login Modal Styles
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #667eea;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    cursor: move;
    user-select: none;
}

.modal-header h2 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.5em;
}

.modal-header p {
    margin: 0;
    color: #999;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

.error-message {
    display: none;
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.error-message.show {
    display: block;
}

/* OAuth Buttons in Modal */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0 20px 0;
    color: #999;
    font-size: 0.9em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    margin: 0 15px;
}

.oauth-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.oauth-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
    padding: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95em;
}

.oauth-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.oauth-icon {
    font-size: 1.2em;
}

.youtube-btn {
    border-color: #FF0000;
    color: #FF0000;
}

.youtube-btn:hover {
    background: #fff5f5;
    border-color: #FF0000;
}

.twitch-btn {
    border-color: #9146FF;
    color: #9146FF;
}

.twitch-btn:hover {
    background: #f5f0ff;
    border-color: #9146FF;
}

.niconico-btn {
    border-color: #252525;
    color: #252525;
}

.niconico-btn:hover {
    background: #f5f5f5;
    border-color: #252525;
}

.instagram-btn {
    border-color: #E1306C;
    color: #E1306C;
}

.instagram-btn:hover {
    background: #fff0f5;
    border-color: #E1306C;
}

.tiktok-btn {
    border-color: #333;
    color: #333;
}

.tiktok-btn:hover {
    background: #f5f5f5;
    border-color: #333;
}

.x-btn {
    border-color: #000;
    color: #000;
}

.x-btn:hover {
    background: #f5f5f5;
    border-color: #000;
}

.facebook-btn {
    border-color: #1877F2;
    color: #1877F2;
}

.facebook-btn:hover {
    background: #f0f5ff;
    border-color: #1877F2;
}

.kick-btn {
    border-color: #009900;
    color: #009900;
}

.kick-btn:hover {
    background: #f0fff0;
    border-color: #009900;
}

.bilibili-btn {
    border-color: #00A1D6;
    color: #00A1D6;
}

.bilibili-btn:hover {
    background: #f0faff;
    border-color: #00A1D6;
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 0.9em;
}

.modal-footer a {
    color: #667eea;
    text-decoration: none;
}

.modal-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    
    .oauth-buttons {
        flex-direction: column;
    }
    
    .oauth-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .modal {
        background-color: white;
        overflow-y: auto;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 16px;
        animation: none;
    }

    .modal-header {
        cursor: default;
    }

    .modal-header p {
        margin-bottom: 0;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .divider {
        margin: 16px 0 14px 0;
    }

    .oauth-buttons {
        gap: 10px;
    }

    .modal-footer {
        margin-top: 14px;
    }
}
