/* CORNERSTONE.REPORT - Mobile-First CRT Terminal Theme System */

/* Import Adobe Source Pro for authentic terminal feel */
/* Google Fonts import removed for CSP compliance */

/* Theme CSS Variables are now loaded from database via theme_context processor */
/* These are fallback defaults only - database theme colors take precedence */
/* Theme variables are injected via templates/includes/theme_styles.html */

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

/* CRT Terminal Base */
body {
    font-family: 'Source Code Pro', monospace;
    background-color: var(--crt-background);
    color: var(--crt-primary);
    font-size: 14px;
    line-height: 1.2;
    margin: 0;
    padding: 10px;
}

/* ASCII Header */
.ascii-header {
    font-family: 'Source Code Pro', monospace;
    font-size: calc(100vw / 80);
    line-height: 1.5;
    color: var(--crt-primary);
    background: transparent;
    text-shadow: var(--crt-glow);
    white-space: pre;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 0.2rem 0 0.2rem;
    background: transparent;
    font-family: 'Source Code Pro', monospace;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: -15px;
    line-height: 1;
    overflow: hidden;
    height: auto;
    min-height: 0;
}

.theme-switcher-container {
    display: flex;
    align-items: flex-start;
}

.theme-selector {
    background: var(--crt-background);
    color: var(--crt-primary);
    border: none;
    outline: none;
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    text-transform: uppercase;
}

.datetime-container {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: right;
    margin-left: auto;
}

/* Status bar link (for DONATE, etc.) */
.status-bar-link {
    color: var(--crt-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Source Code Pro', monospace;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.status-bar-link:hover {
    color: var(--crt-glow, #00ffd5);
    text-shadow: 0 0 8px var(--crt-glow, #00ffd5);
}

.datetime {
    color: var(--crt-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.date-line {
    display: block;
    margin-bottom: 2px;
}

.time-line {
    display: block;
}

/* ASCII Container */
.ascii-container {
    overflow-x: hidden;
    white-space: pre;
    padding: 0;
    text-align: left;
    margin: -100px 0px -95px -2px;
}

/* Search Engines Bar */
.search-engines-bar {
    margin-bottom: 3px;
}

.search-engines-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    margin: 1px;
}

.search-engine-box {
    flex: 1;
    min-width: 0;
}

.search-form {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 5px 2px;
    border: 0.1px solid var(--crt-primary);
    background: var(--crt-background);
    color: var(--crt-text);
    font-family: 'Source Code Pro', monospace;
    font-size: 10px;
    border-radius: 0;
    outline: none;
    text-transform: uppercase;
    text-align: center;
}

.search-input:focus {
    border-color: var(--crt-hover);
    box-shadow: 0 0 5px var(--crt-glow);
}

/* Favicon Bar */
.favicon-bar-section {
    margin-bottom: 5px;
    position: relative;
}

.favicon-bar-section::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--crt-primary), transparent);
    opacity: 0;
}

.favicon-bar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    overflow-x: auto;
    padding: 0px 0;
}

.favicon-link {
    display: inline-block;
    flex-shrink: -1;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.favicon-link:hover {
    transform: scale(1.0);
}

.favicon-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--crt-favicon-border);
    background: var(--crt-favicon-bg);
    padding: 2px;
    object-fit: contain;
}

.favicon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--crt-favicon-border);
    background: var(--crt-favicon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Source Code Pro', monospace;
    font-size: 14px;
    font-weight: bold;
    color: var(--crt-primary);
}

/* Source favicon styles for news articles */
.source-favicon {
    width: 24px;
    height: 24px;
    margin-left: 4px;
    vertical-align: middle;
    border-radius: 3px;
    object-fit: contain;
}

.source-favicon.contrast-bg {
    background: #D3D3D3;
    padding: 2px;
    border: 0px solid #ccc;
}

.source-favicon-inline {
    width: 14px;
    height: 14px;
    margin-left: 2px;
    vertical-align: text-bottom;
    border-radius: 2px;
    object-fit: contain;
}

.source-favicon-inline.contrast-bg {
    background: #D3D3D3;
    padding: 1px;
    border: 0px solid #ccc;
}

.needs-white-bg {
    background: white;
}

/* Tool Links Bar - matches favicon bar styling */
.tool-links-bar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    margin: -15px 0px 0px 0;
    padding: 5px 0;
    background: transparent;
}

.tool-link {
    display: inline-block;
    flex-shrink: -1;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.tool-link:hover {
    transform: scale(1.0);
}

/* Tool links use same favicon styling as main favicon bar */
.tool-links-bar .favicon-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--crt-favicon-border);
    background: var(--crt-favicon-bg);
    padding: 2px;
    object-fit: contain;
}

/* Force transparent favicon backgrounds and borders */
.favicon-icon,
.tool-links-bar .favicon-icon {
    background: transparent !important;
    border: 1px solid transparent !important;
}

.tool-links-bar .favicon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--crt-favicon-border);
    background: var(--crt-favicon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Source Code Pro', monospace;
    font-size: 14px;
    color: var(--crt-primary);
}

.tool-link-name {
    display: none;
    /* Hide text labels, only show on hover via title attribute */
}

/* Content Section - Adjustable Position */
.content-section {
    margin-top: 0px;
}

/* Headline Items - Adjustable Vertical Spacing */
.headline-item {
    margin-bottom: 0px;
    padding: 5px 0;
}

.headline-item:last-child {
    margin-bottom: 0;
    /* Remove bottom margin from last item */
}

/* Crypto Ticker - Adjustable Position */
.crypto-ticker-widget {
    margin-bottom: 15px;
    font-size: 10px;
    margin: 0px 0px 10px 5px;
}

.crypto-ticker {
    background: var(--crt-background);
    border: 1px solid var(--crt-primary);
    padding: 10px;
    margin: 0;
    /* Reset margin, use parent for positioning */
    text-align: center;
    font-size: 9px;
}

.ticker-line {
    font-family: 'Source Code Pro', monospace;
    font-size: 8px;
    color: var(--crt-primary);
    margin: 1px 0px;
}

.dlc-unlock-link {
    color: var(--crt-primary);
    text-decoration: none;
    font-size: 10px;
    margin: 0 5px;
}

.dlc-unlock-link:hover {
    color: var(--crt-hover);
    text-shadow: 0 0 5px var(--crt-primary);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Section Styling */
.section {
    background-color: color-mix(in srgb, var(--crt-background) 90%, black);
    border: 1px solid var(--crt-primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.section-title {
    color: var(--crt-primary);
    font-size: 22px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px var(--crt-primary);
    border-bottom: 0 dashed var(--crt-primary);
    padding-bottom: 0px;
    font-family: 'Source Code Pro', monospace !important;
    text-align: center;
}

/* Footer Section */
.footer-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    /* Semi-transparent background */
    text-align: center;
    font-family: 'Source Code Pro', monospace;
}

.footer-section::before {
    content: '';
    display: block;
    width: 80%;
    height: 1px;
    background: var(--crt-primary);
    margin: 0 auto 15px auto;
}

.footer-section::after {
    content: '';
    display: block;
    width: 80%;
    height: 1px;
    background: var(--crt-primary);
    margin: 15px auto 0 auto;
}

.footer-title {
    color: var(--crt-primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.footer-sponsor-slots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    font-style: italic;
    color: var(--crt-primary);
    font-size: 12px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px;
}

.footer-link {
    color: var(--crt-primary);
    text-decoration: none;
    font-family: 'Source Code Pro', monospace;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--crt-hover);
    text-shadow: 0 0 5px var(--crt-primary);
}

/* Links */
a {
    color: var(--crt-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--crt-hover);
    text-decoration: underline;
}

a:visited {
    color: color-mix(in srgb, var(--crt-primary) 87%, black);
}

/* News Articles */
.news-article {
    background: transparent;
    border: 1px solid var(--crt-primary);
    margin-bottom: 10px;
    padding: 10px;
    transition: all 0.3s ease;
}

.news-article:hover {
    background: rgba(255, 176, 0, 0.05);
    box-shadow: 0 0 10px var(--crt-primary);
}

.news-title {
    font-family: 'Source Code Pro', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--crt-primary);
    margin-bottom: 5px;
}

.news-meta {
    font-size: 11px;
    color: var(--crt-primary);
    margin-bottom: 5px;
}

.news-excerpt {
    font-size: 12px;
    color: var(--crt-primary);
    line-height: 1.4;
}

/* Matrix Rain Effect */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
    background: rgba(0, 255, 0, 0.1);
    /* Temporary debug background */
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Source Code Pro', monospace;
    font-size: 14px;
    color: var(--crt-primary);
    line-height: 1.2;
    white-space: pre;
    animation: matrixFall linear infinite;
    opacity: 0.8;
}

@keyframes matrixFall {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Sponsors Section */
.sponsors-section {
    background: var(--crt-background);
    border: 1px solid var(--crt-primary);
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-family: 'Source Code Pro', monospace;
}

.sponsors-container {
    margin: 10px 0;
}

.sponsor-item {
    color: var(--crt-primary);
    cursor: pointer;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.sponsor-item:hover {
    color: var(--crt-hover);
    text-shadow: 0 0 5px var(--crt-primary);
}

.sponsor-separator {
    color: var(--crt-primary);
    margin: 0 5px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid var(--crt-primary);
    color: var(--crt-primary);
    font-size: 12px;
    font-family: 'Source Code Pro', monospace;
}


/* ============================================================
   GOLDEN RATIO FORM LAYOUT (φ - Nested Fibonacci 8:13:34)
   14.6% Header : 61.8% Content : 23.6% Footer
   ============================================================ */

.golden-form-container {
    display: flex;
    flex-direction: column;
    min-height: 85vh;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

/* Header - Small (14.6%) - Nested golden ratio smallest section */
.golden-form-header {
    flex: 0 0 auto;
    padding: 1.5rem;
    border-bottom: 2px solid var(--crt-glow, #00ffd5);
    background: rgba(0, 128, 0, 0.05);
}

.golden-form-header h1 {
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    color: var(--crt-glow, #00ffd5);
    text-shadow: 0 0 10px var(--crt-glow, #00ffd5);
    font-family: 'Source Code Pro', monospace;
}

.golden-form-header p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--crt-primary);
}

.golden-form-header .privacy-notice {
    margin-top: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--crt-primary);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.3);
}

.golden-form-header .privacy-notice h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--crt-glow, #00ffd5);
}

/* Form Content - Large (61.8%) - Nested golden ratio largest section */
.golden-form-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--crt-primary);
    border-radius: 5px;
    background: rgba(0, 128, 0, 0.02);
}

.form-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: var(--crt-primary);
    border-bottom: 1px solid var(--crt-primary);
    padding-bottom: 0.5rem;
    font-family: 'Source Code Pro', monospace;
}

.form-section h4 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
    color: var(--crt-glow, #00ffd5);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label,
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--crt-primary);
    font-family: 'Source Code Pro', monospace;
}

.form-group input,
.form-group textarea,
.form-group select,
.donation-input,
.donation-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--crt-primary);
    border-radius: 3px;
    background: var(--crt-background, #000000);
    color: var(--crt-primary);
    font-family: 'Source Code Pro', monospace;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--crt-glow, #00ffd5);
    box-shadow: 0 0 5px var(--crt-glow, #00ffd5);
}

.form-help,
.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: rgba(0, 255, 213, 0.7);
    font-style: italic;
}

.form-errors,
.error-message {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Submit Footer - Medium (23.6%) - Nested golden ratio medium section */
.golden-form-footer {
    flex: 0 0 auto;
    padding: 2rem 1.5rem;
    border-top: 2px solid var(--crt-glow, #00ffd5);
    background: rgba(0, 128, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.golden-submit-button,
.donate-button {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    background: var(--crt-primary, #008000);
    color: var(--crt-background, #000000);
    border: 2px solid var(--crt-glow, #00ffd5);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--crt-glow, #00ffd5);
    font-family: 'Source Code Pro', monospace;
    text-transform: uppercase;
}

.golden-submit-button:hover,
.donate-button:hover {
    background: var(--crt-glow, #00ffd5);
    color: var(--crt-background, #000000);
    box-shadow: 0 0 20px var(--crt-glow, #00ffd5);
    transform: translateY(-2px);
}

.form-footer-notes {
    text-align: center;
    font-size: 0.9rem;
    color: var(--crt-primary);
    max-width: 600px;
    margin: 0;
}

/* Donation-specific styles */
.donation-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.donation-option:hover {
    border-color: var(--crt-primary);
    background: rgba(0, 128, 0, 0.05);
}

.quick-select {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.quick-select-button {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--crt-primary);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--crt-primary);
    font-family: 'Source Code Pro', monospace;
}

.quick-select-button:hover {
    background-color: var(--crt-primary);
    color: var(--crt-background);
    box-shadow: 0 0 10px var(--crt-primary);
}

/* Cryptocurrency donation styles */
.crypto-wallets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.crypto-wallet {
    border: 1px solid var(--crt-primary);
    border-radius: 5px;
    padding: 1rem;
    background: rgba(0, 128, 0, 0.05);
}

.crypto-wallet h4 {
    margin: 0 0 0.5rem 0;
    color: var(--crt-glow, #00ffd5);
}

.wallet-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-address code {
    flex: 1;
    background: var(--crt-background);
    padding: 0.5rem;
    border-radius: 3px;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    border: 1px solid var(--crt-primary);
    color: var(--crt-primary);
}

.copy-btn {
    background: var(--crt-primary);
    color: var(--crt-background);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    font-family: 'Source Code Pro', monospace;
}

.copy-btn:hover {
    background: var(--crt-glow, #00ffd5);
    box-shadow: 0 0 10px var(--crt-glow, #00ffd5);
}

.crypto-instructions {
    background: rgba(0, 128, 0, 0.05);
    border: 1px solid var(--crt-primary);
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

.crypto-instructions h4 {
    margin: 0 0 0.5rem 0;
    color: var(--crt-glow, #00ffd5);
}

.crypto-instructions ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.crypto-instructions li {
    margin: 0.5rem 0;
    line-height: 1.4;
}

/* Messages */
.messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-success,
.success-message {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    color: #00ff00;
}

.alert-error,
.error-message {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff4444;
    color: #ff4444;
}

/* Responsive adjustments for golden ratio forms */
@media (max-width: 768px) {
    .golden-form-header {
        padding: 1rem;
    }

    .golden-form-header h1 {
        font-size: 1.4rem;
    }

    .golden-form-content {
        padding: 1.5rem 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .golden-form-footer {
        padding: 1.5rem 1rem;
    }

    .golden-submit-button,
    .donate-button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

    .crypto-wallets {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design - Mobile/Tablet/Desktop */