/* Base Styles and Fonts */
@font-face {
    font-family: 'Orbitron';
    src: url('/static/fonts/orbitron-regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Orbitron';
    src: url('/static/fonts/orbitron-bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'ShareTechMono';
    src: url('/static/fonts/share-tech-mono.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'ShareTechMono';
    src: url('/static/fonts/share-tech-mono.woff2') format('woff2');
    font-weight: bold;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #00ff00;
    font-family: 'ShareTechMono', 'Courier New', monospace;
    font-size: 15px; /* slight global reduction */
    overflow-x: hidden; /* prevent horizontal scroll */
    position: relative;
    min-height: 100vh;
    visibility: hidden;
}

body.authenticated,
body.login-page {
    visibility: visible;
}

/* Common Layout */
.main-content {
    margin-top: 60px;
    padding: 40px 20px 100px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 10;
}

/* Form Layout (for RSVP and similar pages) */
.form-layout .main-content {
    max-width: 900px;
}

/* Common Text Styles */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(10, 10, 10, 0.95));
    border: 2px solid #00ff00;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
}

.page-title {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: clamp(22px, 4.5vw, 32px); /* slightly smaller main titles */
    color: #00ff00;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00, 0 0 40px #00ff00;
    animation: terminal-glow 2s ease-in-out infinite alternate;
}

.page-subtitle {
    color: #06ffb4;
    font-size: 16px;
    margin-bottom: 20px;
}

.terminal-container {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(10, 10, 10, 0.95));
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
}

/* Common Animations */
@keyframes terminal-glow {
    0% { 
        text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00, 0 0 40px #00ff00;
        opacity: 1;
    }
    100% { 
        text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
        opacity: 0.9;
    }
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes typewriter {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Cryptographic Session Page Styles */
.qr-frame {
    position: relative;
    display: inline-block;
    border: 2px solid #00ff41;
    border-radius: 8px;
    padding: 10px;
    background: rgba(0, 255, 65, 0.1);
}

.qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.qr-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.qr-corners .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b6b;
}

.qr-corners .corner.tl {
    top: 5px;
    left: 5px;
    border-right: none;
    border-bottom: none;
}

.qr-corners .corner.tr {
    top: 5px;
    right: 5px;
    border-left: none;
    border-bottom: none;
}

.qr-corners .corner.bl {
    bottom: 5px;
    left: 5px;
    border-right: none;
    border-top: none;
}

.qr-corners .corner.br {
    bottom: 5px;
    right: 5px;
    border-left: none;
    border-top: none;
}

.qr-scanline {
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: qr-scan 2s linear infinite;
}

.crypto-id {
    color: #00ff41 !important;
    font-family: 'ShareTechMono', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    word-break: break-all;
}

.platform-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.platform-link {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    border-radius: 4px;
    color: #00ff41;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.platform-link:hover {
    background: rgba(0, 255, 65, 0.2);
    text-shadow: 0 0 10px #00ff41;
}

.resource-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.resource-link {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.resource-link:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    transform: translateX(5px);
}

.resource-link .link-icon {
    font-size: 1.5em;
    margin-right: 15px;
    min-width: 30px;
}

.resource-link .link-title {
    font-weight: bold;
    color: #00ff41;
    margin-right: 15px;
    min-width: 120px;
}

.resource-link .link-desc {
    color: #cccccc;
    font-size: 0.9em;
    line-height: 1.3;
}

.resource-link.event-link .link-icon { color: #ff6b6b; }
.resource-link.location-link .link-icon { color: #4ecdc4; }
.resource-link.access-link .link-icon { color: #ffe66d; }
.resource-link.external-link .link-icon { color: #a8e6cf; }

/* Cryptographic Animations */
@keyframes crypto-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes qr-scan {
    0% { top: 10%; opacity: 1; }
    50% { opacity: 1; }
    100% { top: 85%; opacity: 0; }
}

/* Responsive Design - Mobile First Approach */

/* Mobile (320px - 768px) */
@media (max-width: 768px) {
    body {
        font-size: 13px;
        overflow-x: hidden;
    }

    .main-content {
        padding: 15px 10px 60px;
        margin-top: 70px; /* Account for flexible nav height */
        max-width: 100%;
        width: 100%;
    }

    .page-header {
        padding: 15px 10px;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 18px;
        line-height: 1.2;
        margin-bottom: 10px;
    }

    .page-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .terminal-container {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 4px;
    }

    .platform-links {
        flex-direction: column;
        gap: 8px;
    }

    .platform-link {
        padding: 10px 15px;
        text-align: center;
        font-size: 0.85em;
    }

    .resource-links {
        gap: 8px;
    }

    .resource-link {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }

    .resource-link .link-icon {
        font-size: 1.8em;
        margin: 0 0 8px 0;
    }

    .resource-link .link-title {
        margin: 0 0 8px 0;
        min-width: auto;
        font-size: 0.95em;
    }

    .resource-link .link-desc {
        font-size: 0.8em;
        margin: 0;
    }

    .qr-frame {
        max-width: 100%;
        display: block;
        margin: 0 auto;
    }

    .qr-frame img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    /* Status bar mobile adjustments */
    .status-bar {
        padding: 0 10px;
        font-size: 8px;
        height: 25px;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }

    .status-left, .status-right {
        gap: 6px; /* Further reduced for mobile */
        font-size: 8px;
    }

    .status-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    body {
        font-size: 12px;
    }

    .main-content {
        padding: 10px 8px 50px;
        margin-top: 65px; /* Account for flexible nav height */
    }

    .page-header {
        padding: 12px 8px;
        margin-bottom: 15px;
    }

    .page-title {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .terminal-container {
        padding: 12px;
        margin-bottom: 15px;
    }

    .status-bar {
        padding: 0 8px;
        font-size: 7px;
        height: 22px;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }

    .status-left, .status-right {
        gap: 4px; /* Even smaller for very small screens */
    }

    .status-item {
        max-width: 80px;
        font-size: 7px;
    }
}

/* Very Small Mobile (less than 360px) */
@media (max-width: 360px) {
    .main-content {
        padding: 8px 5px 45px;
        margin-top: 60px; /* Account for flexible nav height */
    }

    .page-header {
        padding: 10px 5px;
    }

    .terminal-container {
        padding: 10px;
    }

    .status-bar {
        padding: 0 5px;
        font-size: 6px;
        height: 20px;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }

    .status-item {
        max-width: 60px;
        font-size: 6px;
    }
}
