:root {
    --primary-color: #1a1a1a;
    --secondary-color: #e63946;
    --accent-color: #ffd700;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --heading-font: 'Orbitron', sans-serif;
    --body-font: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--body-font);
    line-height: 1.6;
    background: #000000;
    color: var(--text-color);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    background-size: 50px 50px;
    opacity: 0.1;
    pointer-events: none;
    animation: backgroundMove 20s linear infinite;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: transparent;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.logo {
    max-width: 200px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
    animation: pulse 2s infinite;
}

h1 {
    font-family: var(--heading-font);
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2.5rem;
}

.subtitle {
    color: #fff;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.signup-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: formAppear 0.5s ease-out;
    max-width: 33.333%;
    margin: 0 auto;
}

.signup-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

.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:nth-child(7) { animation-delay: 0.7s; }
.form-group:nth-child(8) { animation-delay: 0.8s; }

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    font-family: var(--heading-font);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="text"],
input[type="email"],
input[type="date"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--body-font);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    outline: none;
    transform: translateY(-2px);
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    text-transform: none;
}

.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: normal;
    text-transform: none;
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    transform: scale(1.2);
}

.checkbox-label a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.submit-btn {
    background: linear-gradient(45deg, var(--secondary-color), #ff4d4d);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    font-family: var(--heading-font);
    font-weight: 700;
}

.submit-btn::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: 0.5s;
}

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

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.4);
}

/* Success Overlay Styles */
.success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    padding: 1rem;
}

.success-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.success-content {
    text-align: center;
    padding: 2rem;
    position: relative;
    animation: scaleIn 0.5s ease-out;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.checkmark {
    width: min(80vh, 80vh);
    height: min(80vh, 80vh);
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: min(50vw, 50vh);
    color: #4CAF50;
    box-shadow: 0 0 40px rgba(0,0,0,0.15);
    animation: pop 0.4s cubic-bezier(.68,-0.55,.27,1.55), pulse 2s ease-in-out infinite;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
    margin-bottom: 5rem;
}

.success-content h2 {
    font-family: var(--heading-font);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--accent-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.success-content p {
    font-size: clamp(1rem, 4vw, 1.2rem);
    color: #fff;
    margin: 0;
}

.close-btn {
    background: linear-gradient(45deg, var(--accent-color), #ffd700);
    color: var(--primary-color);
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    border: none;
    border-radius: 4px;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    font-family: var(--heading-font);
    margin-top: 1rem;
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* Animations */
@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes backgroundMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(0,0,0,0.15);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px rgba(0,0,0,0.25);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(0,0,0,0.15);
    }
}

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

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

@keyframes checkmarkAppear {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

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

/* Paint Splatter Effects */
.paint-splatter {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.paint-splatter::before,
.paint-splatter::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.1;
    animation: splatterPulse 4s infinite alternate;
}

.paint-splatter::before {
    top: 10%;
    left: 10%;
    transform: rotate(45deg);
}

.paint-splatter::after {
    bottom: 10%;
    right: 10%;
    transform: rotate(-45deg);
    animation-delay: 2s;
}

@keyframes splatterPulse {
    0% {
        transform: scale(1) rotate(45deg);
        opacity: 0.1;
    }
    100% {
        transform: scale(1.2) rotate(45deg);
        opacity: 0.2;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .signup-form {
        padding: 1rem;
    }
    
    .success-content {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .checkmark {
        max-width: 90vw;
        max-height: 90vh;
    }
    
    .form-page.active ~ header,
    header.hidden {
        display: none;
    }
}

/* Error Message Styles */
.error-message {
    color: #e63946;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease-out;
}

/* Disabled Button Styles */
.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Input Error State */
input.error {
    border-color: #e63946 !important;
    background-color: rgba(230, 57, 70, 0.05) !important;
}

/* Autofill Message Styles */
.autofill-message {
    color: #4CAF50;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
    animation: fadeIn 0.3s ease-out;
}

/* Autofilled Input Styles */
input:autofill,
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(76, 175, 80, 0.1) inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Form Pages */
.form-page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.form-page.active {
    display: block;
    opacity: 1;
}

/* Overlay covers the whole screen and centers content */
.overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.overlay.active {
    display: flex;
}

/* Hide the form when overlay is active */
.overlay.active ~ .container,
.overlay.active ~ .signup-form,
.overlay.active ~ main {
    display: none !important;
}

/* Big checkmark in a white circle */
.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.overlay-content h2 {
    color: #222;
    background: #fff;
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    padding: 0.5rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.overlay-content p {
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

@keyframes pop {
    0% { transform: scale(0.7);}
    80% { transform: scale(1.1);}
    100% { transform: scale(1);}
}

/* Admin Interface Styles */
.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    align-items: center;
    width: 100%;
}

.search-input {
    flex: 2;
    min-width: 300px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--body-font);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    outline: none;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.filter-select {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--body-font);
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    outline: none;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 200px);
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

th {
    background: var(--primary-color);
    color: white;
    font-family: var(--heading-font);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 5;
}

tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile Responsive Table */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .table-controls {
        padding: 1rem;
        gap: 0.75rem;
    }

    .search-input {
        min-width: 100%;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .table-container {
        height: calc(100vh - 180px);
        margin: 0;
        border-radius: 0;
    }

    th, td {
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    /* Hide less important columns on mobile */
    th:nth-child(4), td:nth-child(4), /* Email */
    th:nth-child(8), td:nth-child(8), /* DOB */
    th:nth-child(9), td:nth-child(9) { /* Location */
        display: none;
    }

    /* Make important columns more visible */
    th:nth-child(1), td:nth-child(1), /* Date */
    th:nth-child(2), td:nth-child(2), /* Team Name */
    th:nth-child(3), td:nth-child(3) { /* Full Name */
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 1;
    }

    th:nth-child(1), th:nth-child(2), th:nth-child(3) {
        background: var(--primary-color);
        z-index: 6;
    }

    .signup-form {
        max-width: 100%;
        padding: 1rem;
    }
}

/* Loading State */
.loading {
    position: relative;
    min-height: 200px;
}

.loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--heading-font);
    color: var(--primary-color);
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
    font-style: italic;
}

/* Login Form Styles */
#loginForm {
    max-width: 400px;
    margin: 2rem auto;
}

/* Logout Button */
#logoutBtn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    #logoutBtn {
        bottom: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem 1rem;
    }
}

/* Password Input Group Styles */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input[type="password"],
.password-input-group input[type="text"] {
    padding-right: 40px; /* Make room for the eye icon */
    width: 100%;
    font-family: var(--body-font);
    font-size: 1rem;
    letter-spacing: 0.1em; /* Add spacing between password characters */
    padding:0.75rem;
}

/* Ensure consistent width for password field */
.password-input-group input[type="password"] {
    font-family: monospace; /* Use monospace font for consistent character width */
    letter-spacing: 0.2em; /* Increase spacing for password characters */
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--primary-color);
    opacity: 0.6;
    transition: opacity 0.3s ease;
    z-index: 2; /* Ensure the button stays above the input */
}

.password-toggle:hover {
    opacity: 1;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Admin table container specific styles */
#submissionsTable.signup-form {
    max-width: 100%;
    width: 100%;
}

/* Keep the login form at 1/3 width */
#loginForm.signup-form {
    max-width: 33.333%;
    width: 33.333%;
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .signup-form {
        max-width: 100%;
        padding: 1rem;
    }

    #loginForm.signup-form {
        max-width: 100%;
        width: 100%;
    }
} 