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

:root {
    /* Light mode colors (default) */
    --bg-primary: #fff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #f9f9f9;
    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #888;
    --text-link: #666;
    --text-link-hover: #333;
    --border-primary: #333;
    --border-secondary: #ddd;
    --border-tertiary: #e0e0e0;
    --border-light: #ccc;
    --border-share: #d0d0d0;
    --border-share-hover: #999;
    --wallet-bg: #fff;
    --wallet-text: #555;
    --button-primary: #4CAF50;
    --button-primary-hover: #45a049;
    --button-disabled: #ccc;
    --button-secondary: #666;
    --button-secondary-hover: #444;
    --share-btn-hover-bg: #f5f5f5;
    --share-btn-text: #666;
    --share-btn-text-hover: #444;
}

/* Dark mode - browser preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-tertiary: #252525;
        --text-primary: #e8e8e8;
        --text-secondary: #b8b8b8;
        --text-tertiary: #999;
        --text-link: #b8b8b8;
        --text-link-hover: #e8e8e8;
        --border-primary: #999;
        --border-secondary: #444;
        --border-tertiary: #333;
        --border-light: #555;
        --border-share: #555;
        --border-share-hover: #888;
        --wallet-bg: #2d2d2d;
        --wallet-text: #b8b8b8;
        --button-primary: #5cb860;
        --button-primary-hover: #4CAF50;
        --button-disabled: #555;
        --button-secondary: #888;
        --button-secondary-hover: #aaa;
        --share-btn-hover-bg: #363636;
        --share-btn-text: #b8b8b8;
        --share-btn-text-hover: #e8e8e8;
    }
}

/* Dark mode - manual override */
:root[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #252525;
    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --text-tertiary: #999;
    --text-link: #b8b8b8;
    --text-link-hover: #e8e8e8;
    --border-primary: #999;
    --border-secondary: #444;
    --border-tertiary: #333;
    --border-light: #555;
    --border-share: #555;
    --border-share-hover: #888;
    --wallet-bg: #2d2d2d;
    --wallet-text: #b8b8b8;
    --button-primary: #5cb860;
    --button-primary-hover: #4CAF50;
    --button-disabled: #555;
    --button-secondary: #888;
    --button-secondary-hover: #aaa;
    --share-btn-hover-bg: #363636;
    --share-btn-text: #b8b8b8;
    --share-btn-text-hover: #e8e8e8;
}

/* Light mode - manual override */
:root[data-theme="light"] {
    --bg-primary: #fff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #f9f9f9;
    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #888;
    --text-link: #666;
    --text-link-hover: #333;
    --border-primary: #333;
    --border-secondary: #ddd;
    --border-tertiary: #e0e0e0;
    --border-light: #ccc;
    --border-share: #d0d0d0;
    --border-share-hover: #999;
    --wallet-bg: #fff;
    --wallet-text: #555;
    --button-primary: #4CAF50;
    --button-primary-hover: #45a049;
    --button-disabled: #ccc;
    --button-secondary: #666;
    --button-secondary-hover: #444;
    --share-btn-hover-bg: #f5f5f5;
    --share-btn-text: #666;
    --share-btn-text-hover: #444;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    padding: 20px;
    direction: ltr;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Right-to-left language support */
body[dir="rtl"] {
    direction: rtl;
}

body[dir="rtl"] .content p {
    text-align: right;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
}

.language-selector {
    text-align: right;
    margin-bottom: 20px;
    padding: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.language-selector label {
    font-size: 14px;
    color: var(--text-secondary);
}

.language-selector select {
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.content {
    margin-bottom: 30px;
}

.content h1 {
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;
}

.content p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1.1em;
}

.qr-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    border: 2px dashed var(--border-primary);
    transition: border-color 0.3s ease;
}

.qr-section h2 {
    margin-bottom: 15px;
}

#qrcode {
    display: inline-block;
    margin: 20px auto;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 8px;
}

#qrcode img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.url-text {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 10px;
}

.vote-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.vote-section h2 {
    margin-bottom: 15px;
}

#vote-btn {
    background-color: var(--button-primary);
    color: white;
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

#vote-btn:hover {
    background-color: var(--button-primary-hover);
}

#vote-btn:disabled {
    background-color: var(--button-disabled);
    cursor: not-allowed;
}

.vote-count {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: bold;
}

/* Footer */
.main-footer {
    margin-top: 40px;
    padding: 15px 20px;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-tertiary);
    text-align: center;
    font-size: 0.85em;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Donation section (hidden for now) */
.donation-footer {
    margin-top: 40px;
    padding: 15px 20px;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-tertiary);
    text-align: center;
    font-size: 0.85em;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.crypto-wallet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wallet-address {
    background: var(--wallet-bg);
    padding: 6px 12px;
    border: 1px solid var(--border-secondary);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--wallet-text);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.copy-btn {
    background-color: var(--button-secondary);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: var(--button-secondary-hover);
}

.footer-links {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-tertiary);
    transition: border-color 0.3s ease;
}

.footer-links a {
    color: var(--text-link);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

/* Share section */
.share-section {
    margin-bottom: 20px;
}

.share-section h3 {
    font-size: 0.95em;
    margin-bottom: 12px;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.share-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 3px;
    text-decoration: none;
    color: var(--share-btn-text);
    font-size: 0.8em;
    font-weight: 400;
    transition: all 0.2s ease;
    border: 1px solid var(--border-share);
    background-color: transparent;
    cursor: pointer;
    font-family: inherit;
}

.share-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

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

.share-btn:hover svg {
    opacity: 0.9;
}

/* Remove platform-specific colors - all buttons use same minimal style */
.share-btn-native,
.share-btn-twitter,
.share-btn-facebook,
.share-btn-whatsapp,
.share-btn-telegram,
.share-btn-calendar {
    /* Inherits base .share-btn styles */
}

/* Disclaimer page specific styles */
.disclaimer-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-tertiary);
    text-align: center;
    transition: border-color 0.3s ease;
}

.disclaimer-footer a {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.2s;
}

.disclaimer-footer a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

/* Responsive design */
@media screen and (max-width: 600px) {
    body {
        padding: 10px;
    }

    .content h1 {
        font-size: 1.5em;
    }

    .content p {
        font-size: 1em;
    }

    .wallet-address {
        font-size: 0.75em;
    }

    .share-buttons {
        gap: 6px;
    }

    .share-btn {
        padding: 5px 10px;
        font-size: 0.75em;
    }
}

/* Print styles */
@media print {
    body {
        padding: 0;
    }

    .no-print {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }

    .content p {
        font-size: 12pt;
        line-height: 1.5;
    }

    .qr-section {
        page-break-inside: avoid;
        border: 2px solid #000;
    }

    .donation-footer {
        page-break-inside: avoid;
        border-top: 1px solid #333;
        background-color: transparent;
    }

    /* Ensure everything fits on one page for leaflet */
    @page {
        margin: 1cm;
        size: A4;
    }
}
