:root {
    --glitch-duration: 0.9s;
    --text-color: black;
    --bg-color: white;
    --text-color-rgb: 0, 0, 0;
    --bg-color-rgb: 255, 255, 255;
    --accent-color: #00ff00;
}

.dark-mode {
    --text-color: white;
    --bg-color: black;
    --text-color-rgb: 255, 255, 255;
    --bg-color-rgb: 0, 0, 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Consolas', monospace;
    cursor: default;
}

*::selection {
    background: #0000ff;
    color: white;
}

body {
    background: white;
    color: black;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip: rect(0, 0, 0, 0);
}

.glitch::before {
    left: -2px;
    text-shadow: 2px 0 #ff0000;
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: 2px;
    text-shadow: -2px 0 #0000ff;
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% {
        clip: rect(20px, 1000px, 21px, 0);
    }
    20% {
        clip: rect(91px, 1000px, 99px, 0);
    }
    40% {
        clip: rect(43px, 1000px, 24px, 0);
    }
    60% {
        clip: rect(67px, 1000px, 108px, 0);
    }
    80% {
        clip: rect(86px, 1000px, 18px, 0);
    }
    100% {
        clip: rect(35px, 1000px, 59px, 0);
    }
}

@keyframes glitch-2 {
    0% {
        clip: rect(65px, 1000px, 119px, 0);
    }
    20% {
        clip: rect(45px, 1000px, 79px, 0);
    }
    40% {
        clip: rect(92px, 1000px, 138px, 0);
    }
    60% {
        clip: rect(23px, 1000px, 86px, 0);
    }
    80% {
        clip: rect(74px, 1000px, 95px, 0);
    }
    100% {
        clip: rect(32px, 1000px, 114px, 0);
    }
}

/* Matrix Rain Canvas */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(var(--bg-color-rgb), 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    color: var(--text-color);
}

.logo {
    text-decoration: none;
    color: black;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.logo {
    text-shadow: 0 0 10px rgba(var(--text-color-rgb), 0);
    transition: text-shadow 0.3s;
}

.logo:hover {
    text-shadow: 
        0 0 10px rgba(var(--text-color-rgb), 0.5),
        0 0 20px rgba(var(--text-color-rgb), 0.3),
        0 0 30px rgba(var(--text-color-rgb), 0.1);
}

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

.nav-links a {
    text-decoration: none;
    color: black;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.nav-links a::before {
    content: attr(data-text);
    position: absolute;
    top: -1rem;
    left: 0;
    font-size: 0.7rem;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
}

.nav-links a:hover {
    transform: skew(-10deg);
}

.nav-links a:hover::before {
    opacity: 0.5;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 6rem;
    margin-bottom: 1rem;
    position: relative;
    user-select: none;
}

.hero h1 {
    position: relative;
    transition: all 0.3s;
}

.hero h1::before {
    content: attr(data-text);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: blur(20px);
    opacity: 0;
    color: var(--text-color);
    transition: all 0.3s;
    z-index: -1;
}

.hero h1:hover {
    transform: scale(1.1);
    letter-spacing: 5px;
}

.hero h1:hover::before {
    opacity: 0.5;
    filter: blur(10px);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    transition: all 0.3s;
}

.hero p:hover {
    transform: scale(1.1);
    opacity: 1;
}

.register-link {
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid currentColor;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.register-link:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.register-link::before {
    content: '>';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s;
}

.register-link:hover::before {
    left: 5px;
    opacity: 1;
}

/* Glitch Text Effect removed - unused */

.hidden-message {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.hidden-message.visible {
    opacity: 0.5;
    transform: translateY(0);
}

/* Glitch Animation removed - unused */

/* Matrix Rain Canvas */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 0;
}

/* Dark Mode Styles */
body.dark-mode {
    background: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode nav {
    background: rgba(0, 0, 0, 0.95);
    transition: background-color 0.3s ease;
    backdrop-filter: blur(5px);
}

.dark-mode .logo,
.dark-mode .nav-links a {
    color: var(--text-color);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    z-index: 2;
}

.dark-mode .nav-links a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dark-mode .event-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .event-hover {
    background: rgba(0, 0, 0, 0.95);
}

/* Add smooth transitions for all elements */
body, nav, .logo, .nav-links a, .event-card, .team-card {
    transition: all 0.3s ease;
}

/* Date text hover effect */
.date-text {
    position: relative;
}

.date-text::before {
    content: attr(data-text);
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.date-text:hover::before {
    opacity: 0.5;
    transform: translateX(-50%) translateY(0);
}

/* Events Page */
.events-page {
    padding: 8rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.event-header-section {
    margin-bottom: 4rem;
}

.event-title-wrapper {
    text-align: left;
    margin-bottom: 2rem;
}

.event-title-wrapper h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    position: relative;
}

.event-subtitle {
    font-family: 'Consolas', monospace;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code-comment {
    color: var(--text-color);
    opacity: 0.5;
}

.terminal-line {
    color: var(--text-color);
    font-weight: bold;
}

/* Event filters removed - unused */

.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.event-large-card {
    background: rgba(var(--text-color-rgb), 0.03);
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
}

.event-large-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(var(--text-color-rgb), 0.1);
}

.card-content {
    padding: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.event-id {
    font-family: 'Consolas', monospace;
    opacity: 0.5;
}

.event-category {
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-family: 'Consolas', monospace;
}

.event-main h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.event-details {
    margin-bottom: 2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-family: 'Consolas', monospace;
}

.detail-label {
    opacity: 0.7;
}

.highlight {
    color: var(--text-color);
    font-weight: bold;
}

.event-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Event requirements removed - unused */

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
}

/* Event status removed - unused */

.register-btn {
    text-decoration: none;
    color: var(--text-color);
    font-family: 'Consolas', monospace;
    padding: 0.5rem 1rem;
    border: 1px solid currentColor;
    transition: all 0.3s;
}

.register-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.events-page h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.event-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* Event placeholder and h3 removed - unused */

/* Featured Events */
.featured-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: -2rem auto 0;
    padding: 0 2rem;
}

.event-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    height: 160px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-content {
    position: relative;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
}

/* Event header, info, title-row, brief removed - unused */

.event-desc {
    font-size: 0.9rem;
    opacity: 0.7;
}

.event-tag {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.event-desc {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.event-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.hover-content {
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.event-details {
    font-family: 'Consolas', monospace;
    font-size: 1.2rem;
    color: white;
    opacity: 0.9;
}

/* Event Card Hover Effects */
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.event-card:hover .event-desc {
    opacity: 0.6;
    transform: translateY(0);
}

.event-card:hover .event-hover {
    opacity: 0.9;
}

.event-card:hover .hover-content {
    transform: translateY(0);
}

/* Binary Overlay */
.binary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Team Page */
.team-page {
    padding: 6rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.team-card {
    height: 400px;
    perspective: 1500px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.team-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(var(--text-color-rgb), 0.03);
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.card-back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(var(--text-color-rgb), 0.05);
}

.member-img {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    background: rgba(var(--text-color-rgb), 0.1);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.member-info {
    padding: 1.5rem;
}

.role {
    font-size: 0.8rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.member-info h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.tag {
    font-family: 'Consolas', monospace;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.back-content {
    text-align: center;
}

.stats {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Consolas', monospace;
    color: rgba(var(--text-color-rgb), 0.8);
}

.bio {
    margin-bottom: 2rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.contribution-graph {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin: 0 auto 2rem;
    max-width: 200px;
}

.graph-cell {
    width: 15px;
    height: 15px;
    background: rgba(var(--text-color-rgb), 0.1);
    border-radius: 2px;
    transition: all 0.3s;
}

.graph-cell.active {
    background: rgba(var(--text-color-rgb), 0.8);
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
    font-family: 'Consolas', monospace;
}

/* Team Sections */
.team-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(var(--text-color-rgb), 0.2);
    font-family: 'Consolas', monospace;
}

.team-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

/* Team Cards */
.team-card {
    height: 400px;
    perspective: 1500px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.team-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(var(--text-color-rgb), 0.03);
    border: 1px solid rgba(var(--text-color-rgb), 0.1);
}

.card-back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(var(--text-color-rgb), 0.05);
}

.member-img {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    background: rgba(var(--text-color-rgb), 0.1);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.member-info {
    padding: 1.5rem;
}

.role {
    font-size: 0.8rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.member-info h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.tag {
    font-family: 'Consolas', monospace;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.back-content {
    text-align: center;
}

.stats {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Consolas', monospace;
    color: rgba(var(--text-color-rgb), 0.8);
}

.bio {
    margin-bottom: 2rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    text-decoration: none;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border: 1px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    font-family: 'Consolas', monospace;
}

.social-link:hover {
    transform: scale(1.1);
}

/* Events Page Enhancements */
.events-page {
    padding: 8rem 2rem 2rem;
}

.events-page h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.events-page h1::after {
    content: "_";
    animation: blink 1s infinite;
}

.events-subtitle {
    font-family: 'Consolas', monospace;
    opacity: 0.7;
    margin-bottom: 3rem;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* MISC Page Styles */
.contact-info {
    font-family: 'Consolas', monospace;
    opacity: 0.8;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.support-links {
    margin-top: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    font-family: 'Consolas', monospace;
    font-size: 0.8rem;
    opacity: 0.6;
    border-top: 1px solid rgba(var(--text-color-rgb), 0.1);
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 4rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .featured-events {
        grid-template-columns: 1fr;
        margin-top: 1rem;
    }

    .event-card {
        height: 140px;
    }
}