/* Global Styles */
:root {
    --primary-purple: #3c096c;
    --primary-green: #1b9aaa;
    --accent-yellow: #ffcc00;
    --accent-pink: #ef476f;
    --white: #ffffff;
    --black: #000000;
    --primary-color: #4A90E2;
    --secondary-color: #2ECC71;
    --accent-color: #F39C12;
    --error-color: #E74C3C;
    --success-color: #2ECC71;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --info-color: #4A90E2;
    --text-color: #2C3E50;
    --light-bg: #ffffff;
    --dark-bg: #f8f9fa;
    --blue: #4A90E2;
    --green: #2ECC71;
    --orange: #F39C12;
    --red: #E74C3C;
    --border-color: #E0E0E0;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --star-color: #F39C12;
    --badge-color: #4A90E2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--primary-purple) 30%, var(--accent-pink) 70%, var(--accent-yellow) 100%);
    color: var(--white);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(239, 71, 111, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(60, 9, 108, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 204, 0, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Container Styles */
.container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(239, 71, 111, 0.3);
    border-radius: 20px;
    padding: 40px 30px 30px 30px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 24px rgba(239, 71, 111, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-pink) 0%, var(--primary-purple) 50%, var(--accent-yellow) 100%);
    border-radius: 20px 20px 0 0;
}

/* Typography */
h1 {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--primary-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    font-family: 'Kanit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-purple);
    margin-bottom: 24px;
    text-align: center;
    opacity: 0.8;
}

/* Header Section with Home Button */
.header-section {
    position: relative;
    margin-bottom: 24px;
    text-align: center;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 10px;
}

.nav-btn {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--primary-purple) 100%);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(239, 71, 111, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn i {
    font-size: 18px;
}

.nav-btn:hover {
    color: var(--black);
    transform: translateY(-3px) scale(1.05);
    background: var(--accent-yellow);
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.4);
}

.home-btn i, .signup-btn i {
    font-size: 20px;
}

.home-btn:hover, .signup-btn:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    background: rgba(60, 9, 108, 0.5);
    box-shadow: 0 4px 15px rgba(27, 154, 170, 0.2);
}

.home-btn i {
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-purple);
    font-family: 'Kanit', sans-serif;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(239, 71, 111, 0.2);
    border-radius: 12px;
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-purple);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--accent-pink);
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(239, 71, 111, 0.1),
        0 4px 12px rgba(239, 71, 111, 0.2);
    background: var(--white);
    transform: translateY(-1px);
}

.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: var(--primary-purple);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(239, 71, 111, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(239, 71, 111, 0.2);
}

.radio-group label:hover {
    background: rgba(239, 71, 111, 0.2);
    transform: translateY(-1px);
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--accent-pink);
}

.radio-group input[type="radio"]:checked + label {
    background: var(--accent-pink);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(239, 71, 111, 0.3);
}

.terms {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    color: var(--primary-purple);
    background: rgba(60, 9, 108, 0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(60, 9, 108, 0.1);
}

.terms input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 4px;
    accent-color: var(--accent-pink);
}

.terms a {
    color: var(--accent-pink);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.terms a:hover {
    text-decoration: underline;
    color: var(--primary-purple);
}

/* Button Styles */
.btn-primary {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--primary-purple) 100%);
    color: var(--white);
    border: none;
    border-radius: 15px;
    padding: 16px;
    font-family: 'Kanit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 25px rgba(239, 71, 111, 0.3),
        0 4px 12px rgba(60, 9, 108, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-pink) 100%);
    box-shadow: 
        0 12px 35px rgba(255, 204, 0, 0.4),
        0 6px 18px rgba(239, 71, 111, 0.3);
    transform: translateY(-3px) scale(1.02);
    color: var(--black);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

/* Footer Styles */
.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--primary-purple);
}

.form-footer a {
    color: var(--accent-pink);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.form-footer a:hover {
    text-decoration: underline;
    color: var(--primary-purple);
    background: rgba(239, 71, 111, 0.1);
}

/* Additional Elements */
.forgot-password {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 20px;
}

.forgot-password a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.forgot-password a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

.error-message {
    background: linear-gradient(135deg, rgba(239, 71, 111, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
    color: var(--accent-pink);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    border: 1px solid rgba(239, 71, 111, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.error-message.visible {
    display: block;
}

/* Header and Navigation */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s;
}

nav a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

nav a.active {
    color: var(--secondary-color);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.btn {
    padding: 8px 15px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 71, 111, 0.3);
    background: var(--danger-color);
}

.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 80px auto 30px;
    padding: 0 20px;
}

/* Additional Form Enhancements */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group:focus-within label {
    color: var(--accent-pink);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

/* User Type Selection Enhanced */
.user-type {
    background: rgba(60, 9, 108, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(60, 9, 108, 0.1);
}

.user-type > label {
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
}

/* Enhanced Success States */
input[type="text"]:valid,
input[type="email"]:valid,
input[type="password"]:valid {
    border-color: var(--primary-green);
}

/* Floating Animation for Container */
.form-container {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Pulse Effect for Primary Button */
.btn-primary {
    animation: pulse-shadow 2s infinite;
}

@keyframes pulse-shadow {
    0% { box-shadow: 0 8px 25px rgba(239, 71, 111, 0.3), 0 4px 12px rgba(60, 9, 108, 0.2); }
    50% { box-shadow: 0 12px 35px rgba(239, 71, 111, 0.4), 0 6px 18px rgba(60, 9, 108, 0.3); }
    100% { box-shadow: 0 8px 25px rgba(239, 71, 111, 0.3), 0 4px 12px rgba(60, 9, 108, 0.2); }
}

.btn-primary:hover {
    animation: none;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .form-container {
        padding: 30px 20px 20px 20px;
        border-radius: 16px;
        margin: 10px 0;
    }
    
    .nav-buttons {
        margin-bottom: 15px;
        padding: 0 5px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .nav-btn i {
        font-size: 16px;
    }
    
    h1 {
        font-size: 26px;
        margin-bottom: 6px;
    }
    
    h2 {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .btn-primary {
        font-size: 16px;
        padding: 14px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .radio-group label {
        justify-content: center;
        padding: 10px;
    }
    
    .header {
        padding: 10px 15px;
        flex-direction: column;
    }
    
    nav {
        margin: 10px 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .main-container {
        margin-top: 120px;
    }
}
