/* Sunday Funday League - Unified Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0000 0%, #330000 50%, #000000 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: auto; /* Changed from hidden to auto for all pages */
    padding: 2rem 0; /* Added consistent padding for all pages */
}

/* Ensure all pages can scroll when needed */
body.scrollable,
body.content-page {
    overflow: auto;
    align-items: flex-start;
    padding: 2rem 0;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(139,0,0,0.2)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

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

/* Container Styles */
.container {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(139, 0, 0, 0.4);
    border: 1px solid rgba(139, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    z-index: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    margin: 2rem auto;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 70px rgba(139, 0, 0, 0.6);
}

/* Wide container for content pages */
.container.wide {
    max-width: 900px;
    text-align: left;
}

.container.medium {
    max-width: 800px;
}

/* Icon Styles */
.lock-icon,
.login-icon,
.logo-icon,
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #8b0000, #b30000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    animation: pulse 2s infinite;
    overflow: hidden;
}

.lock-icon img,
.login-icon img,
.logo-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Typography */
h1 {
    color: #e0e0e0;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 2px;
}

h2 {
    color: #8b0000;
    font-size: 1.8rem;
    margin: 2rem 0 1.5rem 0;
    font-weight: 400;
    letter-spacing: 1px;
}

h3 {
    color: rgba(139, 0, 0, 0.9);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 500;
}

p {
    color: rgba(224, 224, 224, 0.8);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.subtitle {
    color: rgba(224, 224, 224, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Content specific typography */
.content {
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1rem;
}

.content h2 {
    color: #8b0000;
    font-size: 1.8rem;
    margin: 2rem 0 1.5rem 0;
    font-weight: 400;
    letter-spacing: 1px;
}

.content h3 {
    color: rgba(139, 0, 0, 0.9);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 500;
}

.content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.content ul,
.content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 1rem;
    text-align: justify;
}

.content a {
    color: #8b0000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content a:hover {
    color: #b30000;
    text-decoration: underline;
}

/* Form Styles */
.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    color: rgba(224, 224, 224, 0.9);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Input Styles */
input[type="password"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(139, 0, 0, 0.5);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    text-align: left;
}

/* Special styling for access code input */
.input-group input[type="password"] {
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-align: center;
    letter-spacing: 3px;
    font-size: 1.1rem;
}

input::placeholder {
    color: rgba(224, 224, 224, 0.6);
}

.input-group input::placeholder {
    letter-spacing: normal;
}

input:focus {
    border-color: rgba(139, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.02);
}

/* Date input specific styling */
input[type="date"] {
    color-scheme: dark;
}

input::-webkit-calendar-picker-indicator,
input::-webkit-datetime-edit-button,
input::-webkit-color-swatch-wrapper,
input::-webkit-file-upload-button {
    filter: invert(1) brightness(100%) contrast(100%);
    cursor: pointer;
    opacity: 1;
}

input::-moz-calendar-picker-indicator,
input::-moz-datetime-edit-button {
    filter: invert(1) brightness(100%) contrast(100%);
    cursor: pointer;
    opacity: 1;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(100%) contrast(100%);
    cursor: pointer;
    opacity: 1;
    background: transparent;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(100%) contrast(100%);
    cursor: pointer;
    opacity: 1;
}

input[type="file"]::-webkit-file-upload-button {
    filter: invert(1) brightness(100%) contrast(100%);
    background: rgba(139, 0, 0, 0.8);
    border: 1px solid rgba(139, 0, 0, 0.5);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: white;
    cursor: pointer;
    margin-right: 1rem;
}

/* Button Styles */
.access-btn,
.login-btn,
.create-account-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #8b0000, #b30000);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 1rem; /* Added consistent bottom margin for spacing */
}

.login-btn,
.create-account-btn {
    border-radius: 12px;
    font-size: 1.1rem;
}

.access-btn::before,
.login-btn::before,
.create-account-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.6s;
}

.access-btn:hover::before,
.login-btn:hover::before,
.create-account-btn:hover::before {
    left: 100%;
}

.access-btn:hover,
.login-btn:hover,
.create-account-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 0, 0, 0.5);
}

.access-btn:active,
.login-btn:active,
.create-account-btn:active {
    transform: translateY(0);
}

.access-btn:disabled,
.login-btn:disabled,
.create-account-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.back-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(139, 0, 0, 0.5);
    border-radius: 25px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 1rem; /* Added consistent bottom margin */
}

.back-btn:hover {
    background: rgba(139, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* Message Styles */
.error-message {
    color: #ff6b6b;
    margin-top: 1rem;
    margin-bottom: 1rem; /* Added bottom margin for consistency */
    padding: 0.8rem;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(139, 0, 0, 0.5);
    display: none;
    animation: shake 0.5s ease-in-out;
}

.success-message {
    color: #8b0000;
    margin-top: 1rem;
    margin-bottom: 1rem; /* Added bottom margin for consistency */
    padding: 0.8rem;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(139, 0, 0, 0.3);
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

/* Green success message variant */
.success-message.green {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

/* Form Section Styles */
.account-creation,
.login-form,
.success-account {
    display: none;
    text-align: left;
    animation: fadeIn 1s ease-out;
    max-height: none;
    overflow-y: visible;
}

.success-account {
    text-align: center;
}

.login-form h1,
.login-form p,
.account-creation h2,
.account-creation p {
    text-align: center;
}

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

/* Password Requirements */
.password-requirements {
    font-size: 0.85rem;
    color: rgba(224, 224, 224, 0.7);
    margin-top: 0.5rem;
    margin-bottom: 1rem; /* Added bottom margin for consistency */
    line-height: 1.4;
}

/* Special Elements */
.highlight-box {
    background: rgba(139, 0, 0, 0.1);
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.phone-number {
    background: rgba(139, 0, 0, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    color: #ffffff;
}

.links-section,
.footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(139, 0, 0, 0.3);
    text-align: center;
}

.footer p {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.9rem;
}

.forgot-password {
    display: block;
    color: rgba(139, 0, 0, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1rem; /* Added consistent top margin */
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: rgba(139, 0, 0, 1);
}

.signup-link {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.95rem;
    margin-top: 1rem; /* Added consistent top margin */
    margin-bottom: 1rem;
}

.sms-links {
    color: rgba(224, 224, 224, 0.6);
    font-size: 0.85rem;
    margin-top: 1rem; /* Added consistent top margin */
}

.sms-links a {
    color: rgba(139, 0, 0, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sms-links a:hover {
    color: rgba(139, 0, 0, 1);
    text-decoration: underline;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header for content pages */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem 0; /* Reduced padding for mobile */
    }
    
    .container {
        padding: 2rem 1.5rem;
        margin: 1rem auto;
    }

    .container.wide,
    .container.medium {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .lock-icon,
    .login-icon,
    .logo-icon,
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .lock-icon img,
    .login-icon img,
    .logo-icon img {
        width: 35px;
        height: 35px;
    }

    .content {
        font-size: 0.95rem;
    }

    .content h2 {
        font-size: 1.5rem;
    }

    .content ul,
    .content ol {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0; /* Reduced padding for smaller mobile */
    }
    
    .container {
        padding: 2rem 1.5rem;
        margin: 1rem auto;
    }

    h1 {
        font-size: 2rem;
    }

    .lock-icon,
    .login-icon,
    .logo-icon,
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .lock-icon img,
    .login-icon img,
    .logo-icon img {
        width: 35px;
        height: 35px;
    }
}