:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --primary-color: #ff007f;
    --secondary-color: #00f0ff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-color);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #7000ff;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Layout & Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    margin-top: 20px;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

.logo span {
    color: var(--primary-color);
    font-weight: 300;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #ccc;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

/* Typography & Hero */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
}

.hero-content {
    text-align: center;
    padding: 60px 40px;
    max-width: 800px;
    width: 100%;
}

h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glitch Effect */
.glitch {
    position: relative;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-color);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary-color);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 30px, 0); }
    20% { clip: rect(50px, 9999px, 80px, 0); }
    40% { clip: rect(20px, 9999px, 40px, 0); }
    60% { clip: rect(90px, 9999px, 120px, 0); }
    80% { clip: rect(30px, 9999px, 60px, 0); }
    100% { clip: rect(70px, 9999px, 100px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(60px, 9999px, 90px, 0); }
    20% { clip: rect(20px, 9999px, 50px, 0); }
    40% { clip: rect(80px, 9999px, 110px, 0); }
    60% { clip: rect(10px, 9999px, 40px, 0); }
    80% { clip: rect(90px, 9999px, 120px, 0); }
    100% { clip: rect(40px, 9999px, 70px, 0); }
}

.hero-content p {
    font-size: 1.25rem;
    color: #bbb;
    margin-bottom: 40px;
    max-width: 600px;
    margin-inline: auto;
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary, .btn-secondary, .btn-glow {
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), #b30059);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 0, 127, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-glow {
    background: var(--secondary-color);
    color: #000;
    padding: 10px 24px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}
.btn-glow:hover {
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.8);
    transform: scale(1.05);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0 80px 0;
}

.feature-card {
    padding: 40px;
    text-align: center;
}

.hover-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.05);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.feature-card p {
    color: #aaa;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 20px;
}

.glass-footer {
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--glass-border);
    color: #777;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    h1 { font-size: 3rem; }
    .hero-content { padding: 40px 20px; }
}

/* Admin Section */
.admin-section {
    padding: 60px 0;
}

.admin-container {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.admin-container h2 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

input[type="text"], input[type="password"], input[type="file"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-family: var(--font-family);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: var(--font-family);
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.admin-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 40px;
    background: rgba(255,255,255,0.02);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.data-card {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    position: relative;
}

.data-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.data-card .info {
    padding: 15px;
}

.data-card h4 {
    margin-bottom: 5px;
    color: #fff;
}

.data-card small {
    color: #aaa;
}

.btn-delete {
    background: #ff0033;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #cc0000;
}

.data-card .btn-delete {
    position: absolute;
    top: 10px;
    right: 10px;
}

.card-actions {
    padding: 10px 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-actions .btn-delete {
    position: static;
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    width: 100%;
}

/* Submit specific styles */
.user-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.user-select-card {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.4);
}

.user-select-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.user-select-card h4 {
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
    margin: 0;
}

.user-select-card .overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,240,255,0.2);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.user-select-card:hover {
    border-color: rgba(255,255,255,0.3);
}

.user-select-card.selected {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(0,240,255,0.4);
}

.user-select-card.selected .overlay {
    opacity: 1;
}

.user-select-card.selected::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--secondary-color);
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.styled-select, .styled-textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-family: var(--font-family);
    font-size: 1rem;
}

.styled-select option {
    background: #111;
    color: #fff;
}

.styled-textarea {
    resize: vertical;
}

/* Leaderboard specific styles */
.leaderboard-container {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leaderboard-row:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
}

.rank-number {
    font-size: 2rem;
    font-weight: 900;
    color: #555;
    min-width: 50px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 2px solid #333;
}

.user-details {
    flex: 1;
    text-align: left;
}

.user-details h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-details small {
    color: #aaa;
    font-size: 0.9rem;
}

.score {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--secondary-color);
    line-height: 1;
}

.score-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

/* Top 3 Styling */
.rank-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(0,0,0,0.5) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}
.rank-1 .rank-number { color: #ffd700; }
.rank-1 .user-avatar { border-color: #ffd700; }
.rank-1 .score-value { color: #ffd700; }

.rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1) 0%, rgba(0,0,0,0.5) 100%);
    border-color: rgba(192, 192, 192, 0.4);
}
.rank-2 .rank-number { color: #c0c0c0; }
.rank-2 .user-avatar { border-color: #c0c0c0; }

.rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1) 0%, rgba(0,0,0,0.5) 100%);
    border-color: rgba(205, 127, 50, 0.4);
}
.rank-3 .rank-number { color: #cd7f32; }
.rank-3 .user-avatar { border-color: #cd7f32; }

/* Admin Submission Cards */
.submission-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    text-align: left;
}

.submission-card h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.submission-card .comment {
    color: #fff;
    margin-bottom: 15px;
    font-style: italic;
}

.submission-users {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sub-user {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.sub-user img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(20,20,20,0.95);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0,240,255,0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--secondary-color);
}

.modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .submission-card {
    background: rgba(0,0,0,0.4);
}
