/* watchdogs_style.css */
:root {
    /* New color palette inspired by HACK-A-SAT */
    --primary-accent: #2f5aae;
    --secondary-accent: #fcaf3b; /* A gold/orange accent */
    --background-color: #121212;
    --text-color: #e0e0e0;
    --card-background: rgba(25, 27, 31, 0.85);
    --border-color: rgba(47, 90, 174, 0.5);

    /* Re-mapping old variables to new ones for compatibility */
    --neon-green: var(--primary-accent);
    --neon-pink: var(--secondary-accent);
    --neon-blue: #00bfff;
    --neon-cyan: #00ffff;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Adjusted padding for better control */
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.nav-links {
    display: flex;
    align-items: center;
}
.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 25px;
    transition: color 0.3s, text-shadow 0.3s;
    font-weight: 600;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--secondary-accent);
    text-shadow: 0 0 8px var(--secondary-accent);
}

/* Spacing between modules */
.section, .section-module {
    margin-top: 80px;
}

/* Text Styles */
.neon-text {
    color: var(--secondary-accent);
    text-shadow: 0 0 5px var(--secondary-accent);
}
.glitch-text {
    font-size: 3.5rem; /* Increased font size */
    font-weight: 700;
    color: #fff;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 0; /* Added padding */
    margin-bottom: 20px; /* Added margin for spacing */
    overflow: hidden; /* CRITICAL FIX: Prevents overflow in ALL directions */
    word-break: break-word; /* Prevents text overflow */
}
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* Removed the background color */
    overflow: hidden;
    padding: 10px 0; /* Match padding */
}
.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-accent);
    animation: glitch-flicker-1 2.5s infinite linear; /* Use new flicker animation */
}
.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary-accent), 2px 2px var(--primary-accent);
    animation: glitch-flicker-2 1.5s infinite linear; /* Use new flicker animation */
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-accent);
    font-weight: 600;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-bottom-color: var(--secondary-accent);
}


/* General Modules & Cards */
.transparent-module {
    background-color: var(--card-background);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-accent);
    border-radius: 8px;
    padding: 50px 40px; /* Increased padding */
    width: 100%; /* Make it full width of its container */
    max-width: none; /* Remove max-width constraint */
    box-sizing: border-box; /* Ensure padding is included in width */
}
.section-module {
    background-color: var(--card-background);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 50px 40px;
}

.transparent-module:hover, .section-module:hover {
    border-color: var(--primary-accent);
    box-shadow: 0 0 20px rgba(47, 90, 174, 0.4);
}

/* Schedule */
.schedule-item {
    border-bottom: 1px dashed var(--border-color);
    padding: 20px 0;
}
.schedule-time { color: var(--secondary-accent); }
.schedule-details h4 { color: var(--primary-accent); }

/* Team */
.member-img { border: 2px solid var(--primary-accent); }
.role-badge {
    background-color: var(--primary-accent);
    color: #fff;
    border: none;
}

/* ===================================================================
   Unified Card Layout & Styling (Corrected)
   =================================================================== */

/* 1. Row & Column Configuration for Equal Height
   ------------------------------------------------------------------- */
.row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch; /* Key for equal height columns */
    margin-right: -15px; /* Bootstrap gutter compensation */
    margin-left: -15px;
}

.card-col {
    display: flex; /* Makes column a flex container */
    margin-bottom: 2rem; /* Vertical spacing between card rows */
}

/* 2. Base Card Styles
   ------------------------------------------------------------------- */
.intro-card,
.member-card,
.ticket-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Stretches card to fill the column */
    width: 100%;

    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.intro-card:hover,
.member-card:hover,
.ticket-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px rgba(47, 90, 174, 0.5);
    border-color: var(--primary-accent);
}

/* 3. Card-Specific Content Styling
   ------------------------------------------------------------------- */

/* Intro Card */
.intro-card h3 {
    color: var(--secondary-accent);
}
.intro-card p {
    flex-grow: 1; /* Pushes content down */
}

/* Member Card */
.member-card p {
    flex-grow: 1; /* Pushes content down */
}

/* Ticket Card */
.ticket-card .ticket-card-content {
    flex-grow: 1; /* This wrapper contains the top part of the card content */
}

.ticket-card h4 {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.ticket-card .price {
    font-size: 3rem;
    color: #fff;
    margin: 20px 0;
    font-weight: 700;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 20px;
}

.ticket-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
    color: #ccc;
    margin-top: 20px;
    margin-bottom: 30px;
}

.ticket-card ul li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.ticket-card ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--secondary-accent);
    font-weight: bold;
}

.ticket-card .btn-cyber {
    margin-top: auto; /* Pushes button to the bottom */
    align-self: center;
}


/* Cyber Button */
.btn-cyber {
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid var(--primary-accent);
    color: #fff;
    background-color: var(--primary-accent);
    text-decoration: none;
    transition: 0.3s;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.btn-cyber:hover {
    background-color: var(--secondary-accent);
    border-color: var(--secondary-accent);
    color: #000;
    box-shadow: 0 0 20px var(--secondary-accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 80px; /* Increased margin */
}
.footer a {
    color: var(--primary-accent);
    text-decoration: none;
}
.footer a:hover {
    color: var(--secondary-accent);
}

/* --- New Flicker Animations --- */
@keyframes glitch-flicker-1 {
    0% { opacity: 1; transform: translate(0); }
    5% { opacity: 0.6; transform: translate(-2px, 1px); }
    10% { opacity: 0.8; transform: translate(1px, -1px); }
    15% { opacity: 0.4; transform: translate(2px, 1px); }
    20% { opacity: 1; transform: translate(0); }
    80% { opacity: 1; transform: translate(0); }
    85% { opacity: 0.5; transform: translate(1px, 1px); }
    90% { opacity: 1; transform: translate(0); }
    100% { opacity: 1; transform: translate(0); }
}

@keyframes glitch-flicker-2 {
    0% { opacity: 1; transform: translate(0); }
    3% { opacity: 0.5; transform: translate(2px, -2px); }
    6% { opacity: 1; transform: translate(0); }
    88% { opacity: 1; transform: translate(0); }
    90% { opacity: 0.3; transform: translate(-2px, 2px); }
    93% { opacity: 1; transform: translate(0); }
    100% { opacity: 1; transform: translate(0); }
}


/* ==================== 响应式优化 ==================== */

/* 移动端优先的断点设置 */
:root {
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
}

/* 汉堡菜单样式 - 只在移动端显示 */
.mobile-menu-toggle {
    display: none; /* 默认隐藏 */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary-accent);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* 汉堡菜单动画 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* 移动端导航菜单 */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--card-background);
    backdrop-filter: blur(20px);
    border-left: 2px solid var(--primary-accent);
    z-index: 999;
    padding: 80px 30px;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(47, 90, 174, 0.2);
    color: var(--secondary-accent);
    transform: translateX(10px);
}

/* 遮罩层 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* section-module 布局优化 */
.section-module {
    overflow: visible !important;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.section-module > * {
    flex-shrink: 0;
}

/* 按钮样式优化 */
.btn-cyber {
    padding: 12px 24px;
    min-height: 44px;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

/* ==================== 响应式断点 ==================== */
@media (max-width: 1024px) {
    /* 平板电脑优化 */
    .glitch-text {
        font-size: 2.8rem;
    }

    .container {
        padding: 0 15px;
    }

    .section, .section-module {
        margin-top: 60px;
    }
}

/* 手机端优化 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .navbar {
        position: relative;
        z-index: 1001;
        padding: 15px 0;
        flex-direction: column;
        align-items: center;
    }

    .glitch-text {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .year-slider-container {
        margin-top: 5vh;
    }

    .section, .section-module {
        margin-top: 60px;
    }

    .transparent-module,
    .section-module {
        padding: 25px 20px;
        margin: 20px 0 !important;
        overflow: visible !important;
        border-radius: 12px !important;
        border-left: 1px solid var(--border-color) !important;
        border-right: 1px solid var(--border-color) !important;
    }

    .ticket-card .price {
        font-size: 2.2rem;
    }

    .schedule-item {
        flex-direction: column;
        padding: 15px 0;
        align-items: flex-start;
    }

    .schedule-time {
        margin-bottom: 10px;
        font-size: 1.1rem;
    }

    .footer {
        padding: 30px 0;
        margin-top: 60px;
    }

    /* 滑块按钮优化 */
    .slider-nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    /* Card Responsive Adjustments */
    .row {
        display: block; /* Stack columns on mobile */
        margin-right: 0;
        margin-left: 0;
    }

    .card-col {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0; /* Margin is now on the card itself */
    }

    .intro-card,
    .member-card,
    .ticket-card {
        height: auto; /* Let content define height */
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* 小屏手机优化 */
    .glitch-text {
        font-size: 1.8rem;
    }

    .neon-text {
        font-size: 0.9rem;
    }

    .btn-cyber {
        padding: 10px 18px;
        font-size: 0.95rem;
        min-height: 42px;
        min-width: 90px;
        font-weight: 600;
    }

    .year-slide {
        padding: 0 5px;
    }

    .transparent-module,
    .section-module {
        padding: 20px 15px;
    }

    .intro-card,
    .member-card,
    .ticket-card {
        padding: 20px 15px;
    }
}

/* 防止移动端缩放 */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* 安全区域支持 */
@supports(padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .mobile-nav {
        padding-top: max(80px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* 高性能动画优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
