/* ========================================
   UTDcodes.com - Discord Theme Styles
   ======================================== */

/* CSS Custom Properties - Discord Color Palette */
:root {
    /* Background Colors */
    --bg-primary: #36393f;
    --bg-secondary: #2f3136;
    --bg-tertiary: #202225;
    --bg-card: #40444b;
    --bg-card-hover: #4a4e54;

    /* Accent Colors */
    --accent: #5865f2;
    --accent-dark: #4752c4;
    --green: #57f287;
    --green-dark: #3ba55c;
    --yellow: #faa61a;
    --red: #ed4245;
    --gray: #72767d;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b9bbbe;
    --text-muted: #72767d;

    /* Misc */
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    --transition: all 0.2s ease;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Header ========== */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--bg-tertiary);
    padding: 24px 0;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
}

.title-utd {
    color: var(--text-primary);
}

.title-codes {
    color: var(--accent);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========== Main Content ========== */
.main {
    flex: 1;
    padding: 32px 0;
}

/* Info Banner */
.info-banner {
    background: rgba(87, 242, 135, 0.08);
    border: 1px solid rgba(87, 242, 135, 0.25);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.info-icon {
    font-size: 1.25rem;
}

.info-banner p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========== Codes Section ========== */
.codes-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
}

.update-badge {
    background: var(--accent);
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.status-dot.expired {
    background: var(--gray);
}

.code-count {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: auto;
}

/* ========== Codes List ========== */
.codes-list {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.codes-list.collapsed {
    display: none;
}

/* Code Row */
.code-row {
    display: grid;
    grid-template-columns: 280px 1fr auto;
    align-items: center;
    padding: 6px 16px;
    border-bottom: 1px solid var(--bg-tertiary);
    gap: 20px;
}

.code-row:last-child {
    border-bottom: none;
}

.code-row.expired {
    opacity: 0.5;
}

.code-row.expired .code-box {
    background: var(--bg-tertiary);
    border-color: var(--bg-tertiary);
}

.code-row.expired .code-box:hover {
    border-color: var(--gray);
}

.code-row.expired .code-value {
    color: var(--text-muted);
}

.code-row.expired .code-icon {
    opacity: 0.5;
}

/* Code Main Area */
.code-main {
    flex-shrink: 0;
}

/* Clickable Code Box */
.code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 5px 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.code-box:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.code-box:active {
    transform: scale(0.98);
}

.code-box.copied {
    border-color: var(--accent);
    background: rgba(88, 101, 242, 0.15);
}

.code-icon {
    font-size: 1.1rem;
    opacity: 0.7;
}

.code-box:hover .code-icon {
    opacity: 1;
}

.code-box.copied .code-icon {
    color: var(--accent);
}

.code-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.code-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--bg-tertiary);
}

.code-box.copied .code-hint {
    color: var(--accent);
}

/* Rewards */
.code-rewards {
    flex: 1;
}

.reward-tag {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.requirement-badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--gray);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 10px;
}

/* Report Button */
.report-btn {
    background: transparent;
    border: 1px solid var(--bg-tertiary);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.report-btn:hover {
    background: rgba(237, 66, 69, 0.1);
    border-color: var(--red);
    color: var(--red);
}

.report-btn.reported {
    background: rgba(88, 101, 242, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    cursor: default;
}

.report-btn:disabled {
    cursor: default;
}

/* Expired Section Toggle */
.expired-section .section-toggle {
    width: 100%;
    background: var(--bg-card);
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    transition: var(--transition);
}

.expired-section .section-toggle:hover {
    background: var(--bg-card-hover);
}

.expired-section .section-toggle .section-header {
    margin-bottom: 0;
}

.toggle-icon {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

/* ========== How to Redeem Section ========== */
.how-to-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-top: 40px;
}

.how-to-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    text-align: center;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.step-number {
    background: var(--accent-dark);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========== FAQ Section ========== */
.faq-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-top: 32px;
}

.faq-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    transition: var(--transition);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary:hover {
    background: var(--bg-card-hover);
}

.faq-item p {
    padding: 0 20px 16px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== Toast Notification ========== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-dark);
    color: white;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-tertiary);
    padding: 24px 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-sub {
    margin-top: 8px;
    font-size: 0.8rem !important;
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .header {
        padding: 20px 0;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.875rem;
    }

    .main {
        padding: 20px 0;
    }

    .codes-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .code-row {
        min-width: 650px;
        grid-template-columns: auto 1fr auto;
    }

    .code-hint {
        display: none;
    }

    .code-count {
        display: none;
    }

    .section-header {
        flex-wrap: nowrap;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 100%;
    }

    .info-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .code-value {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    .code-box {
        padding: 10px 14px;
    }
}