
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: 
        linear-gradient(135deg, rgba(8, 145, 178, 0.8) 0%, rgba(6, 182, 212, 0.8) 25%, rgba(34, 211, 238, 0.8) 50%, rgba(103, 232, 249, 0.8) 75%, rgba(165, 243, 252, 0.8) 100%),
        url('/static/images/swimmer-home.jpg') center/cover no-repeat;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Athletic animations and effects */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

/* Background Effects */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.background-decoration {
    position: absolute;
    top: -20%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.background-decoration-2 {
    position: absolute;
    bottom: -15%;
    left: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

/* Navigation */
.auth-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.brand a {
    text-decoration: none;
}

.brand-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #0891b2;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Main Layout */
.auth-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
    padding: 2rem;
    gap: 4rem;
}

/* Side Content */
.auth-side-content {
    flex: 1;
    padding: 2rem;
    color: white;
}

.auth-side-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.auth-side-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    opacity: 0.9;
}

.feature-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease forwards;
}

.highlight:nth-child(1) { animation-delay: 0.1s; }
.highlight:nth-child(2) { animation-delay: 0.2s; }
.highlight:nth-child(3) { animation-delay: 0.3s; }

.highlight:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.highlight-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.highlight span:last-child {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

/* Form Container */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    min-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    animation: slideInRight 0.8s ease forwards;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    border-radius: 24px 24px 0 0;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeInUp 0.5s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }

.form-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    margin-left: 4px;
}

.form-control {
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    min-height: 52px;
    line-height: 1.5;
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #cbd5e0;
}

.form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* Select Styling */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230891b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
    cursor: pointer;
}

select.form-control option {
    padding: 8px 12px;
    background: white;
    color: #2d3748;
}

select.form-control option[value=""] {
    color: #a0aec0;
    font-style: italic;
}

select.form-control option:not([value=""]) {
    color: #2d3748;
    font-style: normal;
}

/* Toggle buttons */
.toggle-buttons {
    display: flex;
    background: #f7fafc;
    border-radius: 12px;
    padding: 6px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 1rem;
    border: 2px solid #e2e8f0;
}

.toggle-buttons button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #718096;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.toggle-buttons button:hover {
    color: #4a5568;
    background: rgba(8, 145, 178, 0.1);
}

.toggle-buttons button:focus {
    outline: none;
}

.toggle-buttons button.active {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
    transform: translateY(-2px);
}

/* Input Icon Styles */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 16px;
    z-index: 2;
    color: #9ca3af;
    width: 20px;
    height: 20px;
    transition: color 0.3s ease;
}

.input-icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #9ca3af;
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.input-icon-right:hover {
    color: #0891b2;
}

.styled-input {
    padding-left: 52px !important;
    padding-right: 52px !important;
}

.styled-input {
    padding-left: 52px !important;
    width: 100% !important;
    flex: 1;
}

.styled-input-password {
    padding-left: 52px !important;
    padding-right: 52px !important;
    width: 100% !important;
    flex: 1;
}

.input-wrapper:focus-within .input-icon {
    color: #0891b2;
}

/* Submit buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Alert messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-left: 4px solid;
    animation: slideInDown 0.5s ease forwards;
}

.alert-warning {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
    border-left-color: #ea580c;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: #718096;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #0891b2;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: #06b6d4;
    text-decoration: underline;
}

/* Social Login Styles */
.social-login-section {
    margin-bottom: 2rem;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    color: #374151;
}

.social-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.google-btn:hover {
    border-color: #4285F4;
}

.apple-btn:hover {
    border-color: #000;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #6b7280;
}

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

.divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 1200px) {
    .auth-layout {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 1rem;
    }

    .auth-side-content {
        order: 2;
        padding: 1rem;
    }

    .auth-side-content h2 {
        font-size: 2.5rem;
    }

    .form-container {
        order: 1;
        max-width: 500px;
        min-width: auto;
        width: 100%;
    }

    .feature-highlights {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .highlight {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .nav-content {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .auth-layout {
        padding: 1rem;
    }

    .feature-highlights {
        flex-direction: column;
    }

    .form-container {
        padding: 2rem;
        min-width: auto;
    }

    .auth-side-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .auth-header {
        font-size: 1.75rem;
    }

    .toggle-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .toggle-buttons button {
        width: 100%;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .brand-text {
        font-size: 1.5rem;
    }
}

/* Hidden elements */
[style*="display: none"] {
    display: none !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #06b6d4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0891b2;
}
