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

:root {
    /* Palette GTK3 Adwaita-style */
    --bg-primary: #f6f5f4;
    --bg-secondary: #ffffff;
    --bg-header: #e1e1df;
    --border: #cdc7c2;
    --border-dark: #9a9996;
    --text-primary: #2e3436;
    --text-secondary: #5e5c64;
    --accent: #3584e4;
    --accent-hover: #1c71d8;
    --accent-active: #1a5fb4;
    --success: #26a269;
    --success-light: #33d17a;
    --warning: #f6d32d;
    --shadow: rgba(0, 0, 0, 0.07);
    --shadow-hover: rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Cantarell', 'Ubuntu', 'Segoe UI', system-ui, sans-serif;
    font-size: 11pt;
    line-height: 1.5;
    color: var(--text-primary);
    background: linear-gradient(135deg, #e3f2fd 0%, #e1bee7 100%);
    min-height: 100vh;
    padding-top: 80px;
}

/* Header FISSO in alto */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, #fafafa, var(--bg-header));
    border-bottom: 1px solid var(--border-dark);
    padding: 12px 16px;
    box-shadow: 0 1px 3px var(--shadow);
}

.headerbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge-1percent {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 1px 2px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.5);
}

.title-box {
    flex: 1;
}

h1 {
    font-size: 16pt;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.subtitle {
    font-size: 10pt;
    color: var(--text-secondary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* GTK3 Box/Frame style */
.box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px var(--shadow);
}

.box-header {
    font-size: 13pt;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.box-content {
    color: var(--text-primary);
    line-height: 1.6;
}

.box-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

/* GTK3 List style */
.list-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin: 12px 0;
}

.list-row {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

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

.list-row-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.list-row-subtitle {
    font-size: 10pt;
    color: var(--text-secondary);
}

/* GTK3 Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 1px 3px var(--shadow);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    object-fit: contain;
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 11pt;
}

.card-description {
    font-size: 10pt;
    color: var(--text-secondary);
}

/* GTK3 Info Bar style - Success */
.infobar-success {
    background: linear-gradient(to bottom, #d8f3dc, #b7e4c7);
    border: 1px solid var(--success);
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 1px 2px var(--shadow);
}

.infobar-title {
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 8px;
    font-size: 11pt;
}

.infobar-content {
    color: #2d3748;
    font-size: 10pt;
    line-height: 1.6;
}

.infobar-content strong {
    color: #1b5e20;
}

/* GTK3 Button style */
.button-suggested {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
    border: 1px solid var(--accent-active);
    border-radius: 5px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 2px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* GTK3 List with checkmarks */
.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    padding: 8px 0 8px 32px;
    position: relative;
    color: var(--text-primary);
}

.check-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    width: 24px;
    height: 24px;
    background: var(--success-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12pt;
    line-height: 1;
    text-align: center;
}

/* Campagne Grid */
.campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.campaign-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px var(--shadow);
    text-decoration: none;
    color: inherit;
    display: block;
}

.campaign-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 50%;
    font-size: 42px;
    line-height: 1;
    flex-shrink: 0;
}

.campaign-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.campaign-type {
    font-size: 9pt;
    color: var(--text-secondary);
}

/* CALCOLATRICE 1% */
.calculator-box {
    background: linear-gradient(to bottom, #d8f3dc, #b7e4c7);
    border: 1px solid var(--success);
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 2px var(--shadow);
}

.calculator-header {
    font-size: 13pt;
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 16px;
    text-align: center;
}

.calculator-input-group {
    margin-bottom: 16px;
}

.calculator-label {
    display: block;
    font-size: 10pt;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.calculator-input {
    width: 100%;
    padding: 12px;
    font-size: 14pt;
    font-weight: 600;
    border: 1px solid var(--border-dark);
    border-radius: 5px;
    background: white;
    color: var(--text-primary);
    font-family: 'Monospace', 'Courier New', monospace;
    text-align: center;
}

.calculator-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(53, 132, 228, 0.1);
}

.calculator-result {
    background: white;
    border: 2px solid var(--success);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
    display: none;
}

.calculator-result.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-result-label {
    font-size: 10pt;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.calculator-result-amount {
    font-size: 20pt;
    font-weight: 700;
    color: var(--success);
    font-family: 'Monospace', 'Courier New', monospace;
}

.calculator-note {
    margin-top: 12px;
    font-size: 9pt;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

/* Footer GTK3 style */
footer {
    background: var(--bg-header);
    border-top: 1px solid var(--border-dark);
    padding: 24px 16px;
    margin-top: 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 10pt;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

.separator {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.action-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    margin: 16px 0;
}

/* Bottone TORNA SU */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
    border: 1px solid var(--accent-active);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-hover);
    z-index: 999;
}

.scroll-to-top.show {
    display: flex;
}

.monospace {
    font-family: 'Monospace', 'Courier New', monospace;
    font-size: 10pt;
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 3px;
}

.iban-box {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(38, 162, 105, 0.3);
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
    font-family: 'Monospace', 'Courier New', monospace;
    font-size: 11pt;
    font-weight: 600;
    color: #1b5e20;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Effetto hover generico per elementi interattivi */
a, button, .button-suggested, .card, .campaign-card, .list-row, .scroll-to-top {
    transition: all 0.2s ease;
}

a:hover, .box-content a:hover, footer a:hover {
    opacity: 0.8;
}

.card:hover, .campaign-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-hover);
}

.button-suggested:hover, .scroll-to-top:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.list-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .headerbar {
        flex-direction: column;
        text-align: center;
    }
    
    h1 {
        font-size: 14pt;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .campaigns-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body {
        padding-top: 100px;
    }
    
    .calculator-result-amount {
        font-size: 16pt;
    }
}