:root {
    --primary-color: #FFD700;    /* Màu vàng chủ đạo */
    --secondary-color: #B8860B;  /* Màu vàng đậm */
    --accent-color: #FF6B6B;     /* Màu accent */
    --dark-color: #2C3E50;       /* Màu tối */
    --light-color: #ECF0F1;      /* Màu sáng */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
    color: var(--light-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Layout */
header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.button-container {
    display: flex;
    gap: 1rem;
}

/* Auth Buttons */
.auth-btn {
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 16px;
}

.login-btn {
    background-color: transparent;
    color: var(--primary-color);
}

.login-btn:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.register-btn {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.register-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 5%;
    background: url('../images/hero-bg.jpg') center/cover;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--light-color);
}

/* Features Section */
.features-section {
    padding: 100px 5%;
    background: rgba(0, 0, 0, 0.8);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Auth Form Container */
.auth-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    z-index: 1001;
}

.form-wrapper {
    display: none;
}

.form-wrapper h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Elements */
.form-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"], 
input[type="password"] {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: white;
    width: 100%;
}

input[type="text"]:focus, 
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    padding: 12px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--dark-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--secondary-color);
    color: white;
}

/* Username display after login */
.username {
    color: var(--primary-color);
    margin-right: 1rem;
    font-weight: 500;
}

/* Message Styles */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 8px;
    z-index: 1002;
    animation: slideIn 0.5s ease;
}

.error {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff0000;
}

.success {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
}

/* Overlay background */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

/* Auth Form Container updates */
.auth-form-container {
    display: none; /* Mặc định ẩn */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    z-index: 1001;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.form-wrapper {
    display: none; /* Mặc định ẩn cả hai form */
}

.form-wrapper h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

/* Form Elements */
.form-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"], 
input[type="password"] {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: white;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus, 
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.submit-btn {
    padding: 12px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--dark-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

/* Error messages in forms */
#login-error,
#register-error {
    color: var(--accent-color);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Message notifications */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 8px;
    z-index: 1002;
    animation: slideIn 0.5s ease;
}

.error {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff0000;
}

.success {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments for forms */
@media (max-width: 480px) {
    .auth-form-container {
        width: 95%;
        padding: 1.5rem;
    }

    .form-wrapper h2 {
        font-size: 1.5rem;
    }

    input[type="text"], 
    input[type="password"],
    .submit-btn {
        padding: 10px;
        font-size: 0.9rem;
    }

    .close-btn {
        font-size: 20px;
    }
}