﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Nền gradient sáng, nhẹ nhàng */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #333; /* Màu chữ mặc định */
}

/* --- Login Page Styles --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}
.w-100 {
    width: 100%;
}
.login-box {
    background: white; /* Nền trắng đục */
    border-radius: 20px;
    padding: 40px;
    /* Bóng đổ tinh tế hơn */
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    border: 1px solid #e0e0e0; /* Viền xám nhạt */
    width: 100%;
    max-width: 400px;
    animation: slideInUp 0.8s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

    .login-header h1 {
        color: #2c3e50; /* Màu tiêu đề xám đậm */
        font-size: 2.5rem;
        margin-bottom: 10px;
        text-shadow: none; /* Bỏ text-shadow */
    }

    .login-header p {
        color: #6c757d; /* Màu chữ phụ xám nhạt */
        font-size: 1.1rem;
    }

.form-group {
    margin-bottom: 20px;
    position: relative;
}

    .form-group label {
        display: block;
        color: #495057; /* Màu nhãn đậm hơn */
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 0.95rem;
    }

    .form-group input {
        width: 100%;
        padding: 15px 20px;
        background: #f8f9fa; /* Nền input xám rất nhạt */
        border: 1px solid #dee2e6; /* Viền input rõ ràng hơn */
        border-radius: 50px;
        color: #2c3e50; /* Màu chữ trong input */
        font-size: 1rem;
        transition: all 0.3s ease;
    }

        .form-group input:focus {
            outline: none;
            border-color: #80bdff; /* Viền màu xanh khi focus */
            background: white;
            transform: scale(1.02);
            /* Thay box-shadow cho phù hợp với nền sáng */
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
        }

        .form-group input::placeholder {
            color: #adb5bd; /* Màu placeholder xám nhạt */
        }

.login-btn {
    width: 100%;
    padding: 15px;
    /* Gradient màu xanh da trời dịu mắt */
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    /* Bóng đổ phù hợp với màu nút */
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
    }

    .login-btn:active {
        transform: translateY(0);
    }

.forgot-password {
    text-align: center;
    margin-top: 20px;
}

    .forgot-password a {
        color: #007bff; /* Màu link xanh dương chuẩn */
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

        .forgot-password a:hover {
            color: #0056b3; /* Màu link đậm hơn khi hover */
            text-decoration: underline;
        }

/* --- Story List Page Styles --- */
.story-container {
    display: none;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    color: #2c3e50; /* Màu chữ tiêu đề */
    flex-wrap: wrap;
    gap: 20px;
}

    .story-header h1 {
        font-size: 2.5rem;
        text-shadow: none;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white; /* Nền trắng */
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logout-btn {
    background: #e9ecef; /* Nền xám nhạt */
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: #495057; /* Màu chữ xám đậm */
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

    .logout-btn:hover {
        background: #dee2e6; /* Nền đậm hơn khi hover */
        transform: translateY(-1px);
    }

.search-bar {
    background: white; /* Nền trắng */
    border-radius: 50px;
    padding: 15px 25px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

    .search-bar input {
        width: 100%;
        background: none;
        border: none;
        outline: none;
        font-size: 1.1rem;
        color: #333; /* Màu chữ đậm */
        padding: 5px 0;
    }

        .search-bar input::placeholder {
            color: #adb5bd; /* Màu placeholder xám nhạt */
        }

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: rgba(0,0,0,0.05); /* Nền xám trong suốt */
    border: 1px solid rgba(0,0,0,0.08);
    padding: 12px 24px;
    border-radius: 25px;
    color: #495057; /* Màu chữ xám */
    cursor: pointer;
    transition: all 0.3s ease;
}

    .filter-btn:hover {
        background: rgba(0,0,0,0.08);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .filter-btn.active {
        background: linear-gradient(45deg, #4facfe, #00f2fe); /* Gradient xanh */
        color: white;
        transform: scale(1.05);
        border-color: transparent;
    }

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.story-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
    /* Bỏ hiệu ứng ::before vì không nổi bật trên nền sáng */

    .story-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(50, 50, 93, 0.15), 0 8px 20px rgba(0, 0, 0, 0.1);
        border-color: #dee2e6;
    }

.story-image {
    width: 100%;
    height: 200px;
    /* Gradient xanh dịu mắt cho ảnh placeholder */
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.story-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50; /* Màu tiêu đề đậm */
    margin-bottom: 10px;
}

.story-author {
    color: #6c757d; /* Màu chữ phụ */
    margin-bottom: 10px;
    font-style: italic;
}

.story-genre {
    display: inline-block;
    background: #e9ecef; /* Nền xám nhạt */
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #495057; /* Màu chữ đậm hơn */
    margin: 5px 5px 0 0;
}

.story-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    color: #6c757d;
    font-size: 0.9rem;
}

.story-rating {
    color: #f5c518; /* Màu vàng đậm hơn cho dễ nhìn */
}

/* --- Background Effects --- */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

    .floating-shapes::before,
    .floating-shapes::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        /* Màu hình tròn nhẹ nhàng hơn, phù hợp với nền */
        background: rgba(0, 123, 255, 0.08);
        animation: float 6s ease-in-out infinite;
    }

    .floating-shapes::before {
        width: 100px;
        height: 100px;
        top: 20%;
        right: 20%;
        animation-delay: 0s;
    }

    .floating-shapes::after {
        width: 150px;
        height: 150px;
        bottom: 20%;
        left: 10%;
        animation-delay: 3s;
    }

/* --- Animations --- */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
        margin: 10px;
    }

    .story-header {
        flex-direction: column;
        text-align: center;
    }

        .story-header h1 {
            font-size: 2rem;
        }

    .stories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        justify-content: center;
    }
}

/* --- Error Message --- */
.error-message {
    /* Style thông báo lỗi chuẩn trên nền sáng */
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: none;
}
