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

body {
    background: linear-gradient(135deg, rgba(46,125,50,0.85) 0%, rgba(67,160,71,0.85) 100%),
    url('background-ecological.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.container.transparent-bg {
    background: transparent;
    box-shadow: none;
}

.header {
    background: url('header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: local;
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.version-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-top: 10px;
}

.game-info {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-box {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    margin: 5px;
}

.info-box label {
    display: block;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.info-box .value {
    font-size: 2em;
    font-weight: bold;
    color: #2E7D32;
}

.kpi-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px;
    background: #0d3c05;
}

.kpi-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.kpi-box h3 {
    color: #495057;
    font-size: 1em;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2E7D32;
}

.kpi-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.kpi-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2E7D32 0%, #43A047 100%);
    transition: width 0.5s ease;
}

.kpi-bar-fill.complete {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.content {
    padding: 30px;
}

.phase-title {
    font-size: 1.8em;
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2E7D32;
}

.bmc-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.bmc-area {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.bmc-area h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bmc-area h3 .badge {
    background: #2E7D32;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7em;
}

.initiative-card {
    background: white;
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.initiative-card:hover:not(.locked):not(.used):not(.status-quo) {
    border-color: #2E7D32;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
}

.initiative-card.selected {
    border-color: #2E7D32;
    background: linear-gradient(135deg, #293c17 0%, #41a014 100%);
    color: white;
}

.initiative-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f3f5;
}

.initiative-card.used {
    opacity: 0.7;
    background: #e9ecef;
    border-color: #28a745;
}

.initiative-card.status-quo {
    background: #fff3cd;
    border-color: #ffc107;
}

.initiative-card.status-quo.selected {
    background: #ffc107;
    color: #212529;
}

.initiative-card.newly-unlocked {
    border-color: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.card-name {
    font-weight: bold;
    font-size: 1.1em;
    flex: 1;
}

.card-tier {
    background: #2E7D32;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    white-space: nowrap;
    margin-left: 10px;
}

.initiative-card.selected .card-tier {
    background: rgba(255, 255, 255, 0.3);
}

.initiative-card.locked .card-tier {
    background: #95a5a6;
}

.card-description {
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 12px;
    opacity: 0.9;
}

.card-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.stat-badge {
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
}

.initiative-card.selected .stat-badge {
    background: rgba(255, 255, 255, 0.2);
}

.stat-badge.cost {
    background: #fff3cd;
    color: #856404;
}

.initiative-card.selected .stat-badge.cost {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.stat-badge.positive {
    color: #28a745;
}

.initiative-card.selected .stat-badge.positive {
    color: #90EE90;
}

.stat-badge.negative {
    color: #dc3545;
}

.card-requirements {
    font-size: 0.8em;
    color: #dc3545;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.card-unlocks {
    font-size: 0.8em;
    color: #94a728;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
    font-weight: 600;
}

.new-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.7em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.btn {
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.btn-primary:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.config-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #2E7D32;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 999999;
    font-weight: bold;
}

.notification {
    position: fixed;
    bottom: 60px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 2000;
    animation: slideInRight 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.notification.success {
    background: #28a745;
}

.notification.info {
    background: #17a2b8;
}

.notification.warning {
    background: #ffc107;
    color: #212529;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

.tutorial-banner {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.tutorial-banner h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.tutorial-banner ul {
    list-style: none;
    padding: 0;
}

.tutorial-banner li {
    margin: 8px 0;
    padding-left: 25px;
    position: relative;
}



.event-section {
    margin-top: 30px;
}

.event-card {
    background: white;
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.event-card.negative {
    border-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.event-card.positive {
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.goals-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.goal-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #2E7D32;
}

.goal-card h3 {
    color: #2E7D32;
    margin-bottom: 10px;
}

.story-panel {
    background: linear-gradient(135deg, #0a2f12 0%, #042005 100%);
    color: white;
    padding: 4vw;
    text-align: center;
    font-size: 1.3em;
    line-height: 1.8;
}

.story-panel h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffd700;
}

.game-info {
    position: fixed;
    top: 10px;
    right: 20px;
    background: white;
    padding: 5px 5px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}


/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
    padding: 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.modal-header h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.modal-body {
    padding: 30px;
}

.modal-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

.modal-choices {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.choice-button {
    padding: 20px;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.choice-button:hover {
    border-color: #ffc107;
    background: #fff9e6;
    transform: translateX(5px);
}

.choice-button h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.choice-effects {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 10px;
}

.educational-content {
    display: none;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}

.educational-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.educational-content h3 {
    color: #1565c0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.educational-content p {
    color: #0d47a1;
    line-height: 1.7;
    margin-bottom: 12px;
}

.modal-footer {
    padding: 0 30px 30px 30px;
    text-align: center;
}

/* â­ NUOVO: Stili per tooltip economici */
.economic-tooltip {
    margin: 12px 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85em;
    border-left: 4px solid;
}

.economic-tooltip.roi-quick {
    background: #fff3cd;
    border-color: #ffc107;
}

.economic-tooltip.roi-balanced {
    background: #d1ecf1;
    border-color: #17a2b8;
}

.economic-tooltip.roi-longterm {
    background: #d4edda;
    border-color: #28a745;
}

.roi-badge {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.95em;
}

.roi-description {
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.4;
}

.roi-metrics {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9em;
}

.roi-metrics span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.initiative-card.selected .economic-tooltip {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Currency Toggle Styles */
.currency-toggle-box {
    min-width: 180px;
}

.currency-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #2E7D32;
    border-radius: 25px;
    background: white;
    color: #2E7D32;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.toggle-btn:hover {
    background: #2E7D32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
}

.toggle-btn.euro-mode {
    border-color: #28a745;
    color: #28a745;
}

.toggle-btn.euro-mode:hover {
    background: #28a745;
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.currency-icon {
    font-size: 1.2em;
    animation: coinFlip 0.6s ease-in-out;
}

@keyframes coinFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.toggle-btn:active .currency-icon {
    animation: coinFlip 0.6s ease-in-out;
}

/* Tooltip per exchange rate */
#exchangeRate {
    font-weight: bold;
    color: #2E7D32;
}

.economic-status.in-progress {
    background-color: #ffe9a7;
    padding: 4px;
    margin: 4px 0 4px 0;
    border-radius: 7px;
}

.story-hero-image {
    max-width: 100%;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 3px solid rgb(0, 74, 0);
}

/* ========================================
BREAKING NEWS MODAL STYLES
======================================== */

.events-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.events-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.events-modal {
    background: #1a1a1a;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalSlideDown 0.5s ease-out;
}

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

.modal-breaking-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.modal-breaking-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

.live-badge {
    display: inline-block;
    background: #fff;
    color: #dc3545;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85em;
    margin-bottom: 10px;
    animation: pulse-badge 1.5s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.modal-breaking-header h2 {
    color: white;
    margin: 0;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.events-list {
    padding: 20px;
    background: #1a1a1a;
}

.breaking-event-card {
    background: #2a2a2a;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid;
    position: relative;
    animation: slideInRight 0.5s ease-out;
    animation-fill-mode: both;
}

.breaking-event-card:nth-child(1) { animation-delay: 0.1s; }
.breaking-event-card:nth-child(2) { animation-delay: 0.2s; }
.breaking-event-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.breaking-event-card.negative {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #2a2a2a 0%, #3a2525 100%);
}

.breaking-event-card.positive {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #2a2a2a 0%, #253a25 100%);
}

.breaking-event-card.neutral {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3525 100%);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.event-card-title {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-type-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.6em;
    white-space: nowrap;
}

.event-card-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.05em;
}

.event-card-effects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.event-effect-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-effect-badge.negative {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.event-effect-badge.positive {
    background: rgba(40, 167, 69, 0.2);
    color: #51cf66;
    border: 1px solid rgba(40, 167, 69, 0.4);
}

.event-effect-badge.neutral {
    background: rgba(255, 193, 7, 0.2);
    color: #ffd43b;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.event-longterm-notice {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(255, 193, 7, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffd43b;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.events-modal-footer {
    padding: 20px 30px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    text-align: center;
}

.events-modal-footer .btn {
    min-width: 200px;
    font-size: 1.1em;
}

/* ========================================
NEWS TICKER PERSISTENTE
======================================== */

.news-ticker-wrapper {
    position: sticky;
    top: 0;
    z-index: 500;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.news-ticker-container {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #333;
    display: flex;
    align-items: center;
}

.ticker-label {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 0.9em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 2px solid #333;
}

.ticker-label::before {
    content: 'ðŸ”´';
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    height: 45px;
    position: relative;
    background: #2a2a2a;
}

.ticker-scroll {
    display: flex;
    align-items: center;
    height: 100%;
    animation: scroll-left 30s linear infinite;
    white-space: nowrap;
}

.ticker-scroll:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 30px;
    color: white;
    font-size: 0.95em;
    font-weight: 500;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-item.positive {
    color: #51cf66;
}

.ticker-item.negative {
    color: #ff6b6b;
}

.ticker-item.neutral {
    color: #ffd43b;
}

.ticker-separator {
    display: inline-block;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
}

.ticker-effect {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    margin-left: 5px;
}

@media (max-width: 1200px) {
    .bmc-areas {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kpi-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Company Name Form Styles */
#companyNameInput {
    transition: all 0.3s ease;
}

#companyNameInput:focus {
    outline: none;
    border-color: rgba(255,255,255,0.8) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
    transform: scale(1.02);
}

#companyNameInput::placeholder {
    color: #999;
    font-style: italic;
}


@keyframes kpi-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes kpi-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.kpi-box.positive-change {
    animation: kpi-pulse 0.5s ease-out;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
}

.kpi-box.negative-change {
    animation: kpi-shake 0.3s ease-out;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
}

.kpi-celebration {
    animation: kpi-pulse 0.6s ease-out 3;
    border: 3px solid gold !important;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe8a1 100%) !important;
}

/* Hover effects sulle carte */
.initiative-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.initiative-card:hover:not(.locked):not(.used) {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(46, 125, 50, 0.4);
}

.initiative-card:active {
    transform: translateY(-4px) scale(0.98);
}

/* Click feedback */
@keyframes button-press {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.btn:active {
    animation: button-press 0.2s ease-out;
}




/* Notification moderne */
.notification-modern {
    position: fixed;
    top: 20px;
    right: -400px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 10000;
}

.notification-modern.show {
    right: 20px;
}

.notification-modern {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.notification-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-message {
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #2E7D32 0%, #43A047 100%);
}

.notification-modern.achievement {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid #ffc107;
}

.notification-modern.achievement .notification-progress {
    background: linear-gradient(90deg, #ff9800 0%, #ff5722 100%);
}

.notification-modern:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}


.phase-transition {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.transition-text {
    font-size: 1.2em;
    color: #2E7D32;
    font-weight: 600;
}


/* ==========================================
   GAME ANIMATIONS
   ========================================== */

/* KPI Celebration */
@keyframes kpi-celebration {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.08) rotate(-3deg);
    }
    75% {
        transform: scale(1.08) rotate(3deg);
    }
}

.kpi-celebration {
    animation: kpi-celebration 0.6s ease-out 3;
    border: 3px solid gold !important;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe8a1 100%) !important;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6) !important;
}

/* Positive/Negative Flash */
@keyframes positive-flash {
    0%, 100% { background: inherit; }
    50% { background: rgba(40, 167, 69, 0.2); }
}

@keyframes negative-flash {
    0%, 100% { background: inherit; }
    50% { background: rgba(220, 53, 69, 0.2); }
}

.positive-flash {
    animation: positive-flash 0.6s ease-out;
}

.negative-flash {
    animation: negative-flash 0.6s ease-out;
}

/* Shake Error */
@keyframes shake-error {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.shake-error {
    animation: shake-error 0.5s ease-out;
}

/* Pulse */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Progress Bar Complete */
.kpi-bar-fill.complete {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

/* Particle (giÃ  in movimento via jQuery) */
.particle {
    transition: none; /* jQuery gestisce l'animazione */
}