        :root {
            --gold: #d4af37;
            --gold-light: #f4e4a6;
            --gold-dark: #996515;
            --brown-dark: #1a1209;
            --brown-medium: #2d1f0f;
            --brown-light: #3d2914;
            --parchment: #f5e6c8;
            --parchment-dark: #d4c4a8;
            --red: #8b2500;
            --red-light: #c44536;
            --green: #2d5a27;
            --green-light: #4a9c3d;
            --blue: #1e3a5f;
            --blue-light: #3d7ab8;
            --purple: #5a3d7a;
            --purple-light: #8b6bab;
            --orange: #c45c26;
            --text-light: #f0e6d3;
            --text-dark: #1a1209;
            
            --footman: #4a90d9;
            --archer: #5cb85c;
            --cavalry: #d9534f;
        }

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

        /* Hide scrollbar for Chrome, Safari and Opera */
        html::-webkit-scrollbar,
        body::-webkit-scrollbar {
            display: none;
        }

        /* Hide scrollbar for IE, Edge and Firefox */
        html, body {
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
        }

        html {
            overflow-y: auto;
            overflow-x: hidden;
        }

        body {
            font-family: 'Crimson Text', Georgia, serif;
            background: var(--brown-dark);
            color: var(--text-light);
            min-height: 100vh;
            line-height: 1.6;
            overflow-y: auto;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L30 60M0 30L60 30' stroke='%23d4af37' stroke-width='0.5' opacity='0.05'/%3E%3C/svg%3E"),
                radial-gradient(ellipse at center, var(--brown-medium) 0%, var(--brown-dark) 100%);
            pointer-events: none;
            z-index: -1;
        }

        .header {
            background: linear-gradient(180deg, var(--brown-light) 0%, var(--brown-dark) 100%);
            border-bottom: 3px solid var(--gold);
            padding: 20px;
            text-align: center;
        }

        .header h1 {
            font-family: 'Cinzel', serif;
            font-size: clamp(1.5rem, 4vw, 2.5rem);
            color: var(--gold);
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            letter-spacing: 3px;
        }

        .header-subtitle {
            font-family: 'Crimson Text', serif;
            font-size: 1rem;
            color: var(--parchment-dark);
            margin-top: 5px;
            font-style: italic;
        }

        .container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 20px;
        }

        /* Stats Cards */
        .stats-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin: 20px 0;
        }

        .stat-card {
            background: linear-gradient(180deg, rgba(45, 31, 15, 0.95) 0%, rgba(26, 18, 9, 0.98) 100%);
            border: 2px solid var(--gold-dark);
            padding: 20px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            border-color: var(--gold);
            transform: translateY(-2px);
        }

        .stat-card-title {
            font-family: 'Cinzel', serif;
            font-size: 0.75rem;
            color: var(--gold);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 10px;
        }

        .stat-card-value {
            font-family: 'Cinzel', serif;
            font-size: 2rem;
            color: var(--gold-light);
            font-weight: 700;
        }

        .stat-card-subtitle {
            font-size: 0.8rem;
            color: var(--parchment-dark);
            margin-top: 5px;
        }

        /* Total Progress Bar */
        .total-progress-section {
            background: linear-gradient(180deg, rgba(45, 31, 15, 0.95) 0%, rgba(26, 18, 9, 0.98) 100%);
            border: 2px solid var(--gold-dark);
            padding: 20px;
            margin: 20px 0;
        }

        .total-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .total-progress-title {
            font-family: 'Cinzel', serif;
            font-size: 1.1rem;
            color: var(--gold);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .total-progress-percent {
            font-family: 'Cinzel', serif;
            font-size: 1.3rem;
            color: var(--gold-light);
            font-weight: 700;
        }

        .total-progress-bar {
            height: 20px;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid var(--gold-dark);
            overflow: hidden;
        }

        .total-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
            transition: width 0.5s ease;
            box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
        }

        /* View Tabs */
        .view-tabs {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin: 25px 0;
            flex-wrap: wrap;
        }

        .view-tab {
            font-family: 'Cinzel', serif;
            font-size: 0.95rem;
            padding: 12px 25px;
            border: 2px solid var(--gold-dark);
            background: linear-gradient(180deg, var(--brown-light) 0%, var(--brown-dark) 100%);
            color: var(--parchment);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .view-tab:hover {
            border-color: var(--gold);
        }

        .view-tab.active {
            border-color: var(--gold);
            background: linear-gradient(180deg, rgba(212, 175, 55, 0.3) 0%, var(--brown-dark) 100%);
            box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
        }

        .view-content {
            display: none;
        }

        .view-content.active {
            display: block;
        }

        /* Attribute Tracker */
        .attribute-tracker {
            background: linear-gradient(180deg, rgba(45, 31, 15, 0.95) 0%, rgba(26, 18, 9, 0.98) 100%);
            border: 2px solid var(--gold-dark);
            padding: 25px;
        }

        .tracker-header {
            margin-bottom: 20px;
        }

        .tracker-title {
            font-family: 'Cinzel', serif;
            font-size: 1.3rem;
            color: var(--gold);
            text-align: center;
            margin-bottom: 15px;
        }

        .tracker-filters {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
        }

        .tracker-filter-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .tracker-filter-label {
            font-size: 0.85rem;
            color: var(--gold);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .tracker-select {
            font-family: 'Crimson Text', serif;
            font-size: 1rem;
            padding: 10px 15px;
            background: var(--brown-dark);
            border: 2px solid var(--gold-dark);
            color: var(--parchment);
            cursor: pointer;
            min-width: 200px;
        }

        .tracker-select:focus {
            outline: none;
            border-color: var(--gold);
        }

        .tracker-results {
            margin-top: 25px;
        }

        .tracker-results-title {
            font-family: 'Cinzel', serif;
            font-size: 1.1rem;
            color: var(--gold);
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--gold-dark);
        }

        .tracker-result-item {
            background: rgba(61, 41, 20, 0.5);
            border: 1px solid rgba(212, 175, 55, 0.2);
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .tracker-result-item:hover {
            background: rgba(61, 41, 20, 0.8);
            border-color: var(--gold);
        }

        .tracker-research-name {
            font-family: 'Cinzel', serif;
            font-size: 1rem;
            color: var(--gold-light);
            margin-bottom: 5px;
        }

        .tracker-research-column {
            font-size: 0.85rem;
            color: var(--parchment-dark);
            margin-bottom: 10px;
        }

        .tracker-nodes-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .tracker-node-badge {
            background: rgba(212, 175, 55, 0.2);
            border: 1px solid var(--gold-dark);
            padding: 5px 10px;
            font-size: 0.85rem;
            color: var(--parchment);
        }

        .tracker-node-badge.completed {
            background: rgba(74, 156, 61, 0.3);
            border-color: var(--green);
        }

        .tracker-total {
            margin-top: 20px;
            padding: 15px;
            background: linear-gradient(135deg, rgba(153, 101, 21, 0.3) 0%, rgba(45, 31, 15, 0.8) 100%);
            border: 2px solid var(--gold);
            text-align: center;
        }

        .tracker-total-label {
            font-family: 'Cinzel', serif;
            font-size: 0.9rem;
            color: var(--gold);
            text-transform: uppercase;
        }

        .tracker-total-value {
            font-family: 'Cinzel', serif;
            font-size: 1.5rem;
            color: var(--gold-light);
            font-weight: 700;
        }

        .tracker-no-results {
            text-align: center;
            padding: 30px;
            color: var(--parchment-dark);
            font-style: italic;
        }

        /* Path Recommendation */
        .path-recommendation {
            background: linear-gradient(180deg, rgba(45, 31, 15, 0.95) 0%, rgba(26, 18, 9, 0.98) 100%);
            border: 2px solid var(--gold-dark);
            padding: 25px;
        }

        .path-header {
            text-align: center;
            margin-bottom: 25px;
        }

        .path-title {
            font-family: 'Cinzel', serif;
            font-size: 1.5rem;
            color: var(--gold);
            margin-bottom: 8px;
        }

        .path-subtitle {
            font-size: 0.95rem;
            color: var(--parchment-dark);
            font-style: italic;
        }

        .path-selector {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .path-option {
            background: rgba(61, 41, 20, 0.5);
            border: 2px solid rgba(212, 175, 55, 0.3);
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 200px;
            max-width: 280px;
            text-align: center;
        }

        .path-option:hover {
            background: rgba(61, 41, 20, 0.8);
            border-color: var(--gold);
            transform: translateY(-3px);
        }

        .path-option.active {
            background: linear-gradient(135deg, rgba(153, 101, 21, 0.4) 0%, rgba(45, 31, 15, 0.9) 100%);
            border-color: var(--gold);
            box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
        }

        .path-option-icon {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }

        .path-option-name {
            font-family: 'Cinzel', serif;
            font-size: 1.1rem;
            color: var(--gold-light);
            margin-bottom: 8px;
        }

        .path-option-desc {
            font-size: 0.85rem;
            color: var(--parchment-dark);
        }

        .path-option-text {
            flex: 1;
        }

        .path-progress-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin: 25px 0;
            padding: 20px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--gold-dark);
        }

        .path-summary-item {
            text-align: center;
        }

        .path-summary-label {
            font-size: 0.8rem;
            color: var(--gold);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 5px;
        }

        .path-summary-value {
            font-family: 'Cinzel', serif;
            font-size: 1.4rem;
            color: var(--gold-light);
            font-weight: 700;
        }

        .path-summary-value.highlight {
            color: var(--green-light);
        }

        .path-list {
            margin-top: 20px;
        }

        .path-list-header {
            font-family: 'Cinzel', serif;
            font-size: 1.1rem;
            color: var(--gold);
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--gold-dark);
        }

        .path-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            margin-bottom: 8px;
            background: rgba(61, 41, 20, 0.4);
            border: 1px solid rgba(212, 175, 55, 0.15);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .path-item:hover {
            background: rgba(61, 41, 20, 0.7);
            border-color: var(--gold);
        }

        .path-item.completed {
            background: rgba(74, 156, 61, 0.15);
            border-color: rgba(74, 156, 61, 0.4);
        }

        .path-item.next {
            background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, rgba(61, 41, 20, 0.6) 100%);
            border-color: var(--gold);
            box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
        }

        .path-item-number {
            font-family: 'Cinzel', serif;
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--gold-dark);
            background: rgba(0, 0, 0, 0.3);
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .path-item.completed .path-item-number {
            background: var(--green);
            color: white;
        }

        .path-item.next .path-item-number {
            background: var(--gold);
            color: var(--brown-dark);
        }

        .path-item-icon {
            width: 45px;
            height: 45px;
            border: 2px solid var(--gold-dark);
            background: rgba(0, 0, 0, 0.3);
            overflow: hidden;
            flex-shrink: 0;
        }

        .path-item-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .path-item.completed .path-item-icon {
            border-color: var(--green);
        }

        .path-item.next .path-item-icon {
            border-color: var(--gold);
        }

        .path-item-info {
            flex: 1;
        }

        .path-item-name {
            font-family: 'Cinzel', serif;
            font-size: 1rem;
            color: var(--gold-light);
            margin-bottom: 3px;
        }

        .path-item-details {
            font-size: 0.85rem;
            color: var(--parchment-dark);
        }

        .path-item-column {
            display: inline-block;
            background: rgba(212, 175, 55, 0.2);
            padding: 2px 8px;
            font-size: 0.75rem;
            color: var(--gold);
            margin-right: 8px;
        }

        .path-item-status {
            font-family: 'Cinzel', serif;
            font-size: 0.9rem;
            padding: 5px 12px;
            border-radius: 3px;
            flex-shrink: 0;
        }

        .path-item.completed .path-item-status {
            background: rgba(74, 156, 61, 0.3);
            color: var(--green-light);
        }

        .path-item.next .path-item-status {
            background: rgba(212, 175, 55, 0.3);
            color: var(--gold-light);
            animation: pulse 2s infinite;
        }

        .path-item:not(.completed):not(.next) .path-item-status {
            color: var(--parchment-dark);
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }

        .path-item-progress {
            font-size: 0.85rem;
            color: var(--parchment-dark);
            margin-left: auto;
            text-align: right;
        }

        .path-item-progress-bar {
            width: 80px;
            height: 6px;
            background: rgba(0, 0, 0, 0.4);
            margin-top: 4px;
            overflow: hidden;
        }

        .path-item-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-dark), var(--gold));
            transition: width 0.3s ease;
        }

        .path-item.completed .path-item-progress-fill {
            background: linear-gradient(90deg, var(--green), var(--green-light));
        }

        .path-legend {
            display: flex;
            justify-content: center;
            gap: 25px;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid var(--gold-dark);
            flex-wrap: wrap;
        }

        .path-legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
            color: var(--parchment-dark);
        }

        .path-legend-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        .path-legend-dot.completed {
            background: var(--green);
        }

        .path-legend-dot.next {
            background: var(--gold);
        }

        .path-legend-dot.pending {
            background: var(--gold-dark);
            opacity: 0.5;
        }

        /* Troop Selector */
        .troop-selector {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin: 30px 0;
            flex-wrap: wrap;
        }

        .troop-btn {
            font-family: 'Cinzel', serif;
            font-size: 1rem;
            padding: 12px 20px;
            border: 2px solid var(--gold-dark);
            background: linear-gradient(180deg, var(--brown-light) 0%, var(--brown-dark) 100%);
            color: var(--parchment);
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .troop-btn:hover {
            border-color: var(--gold);
            transform: translateY(-2px);
        }

        .troop-btn.active {
            border-color: var(--gold);
            box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
        }

        .troop-btn.footman.active { border-color: var(--footman); box-shadow: 0 0 20px rgba(74, 144, 217, 0.5); }
        .troop-btn.archer.active { border-color: var(--archer); box-shadow: 0 0 20px rgba(92, 184, 92, 0.5); }
        .troop-btn.cavalry.active { border-color: var(--cavalry); box-shadow: 0 0 20px rgba(217, 83, 79, 0.5); }

        .troop-btn-icon {
            width: 32px;
            height: 32px;
            flex-shrink: 0;
        }

        .troop-btn-icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* ===================================== */
        /* COLUMNS GRID - Game Style            */
        /* ===================================== */

        .columns-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .column-box {
            background: linear-gradient(180deg, rgba(45, 31, 15, 0.95) 0%, rgba(26, 18, 9, 0.98) 100%);
            border: 2px solid var(--gold-dark);
            display: flex;
            flex-direction: column;
        }

        .column-box-header {
            background: linear-gradient(180deg, rgba(153, 101, 21, 0.3) 0%, rgba(45, 31, 15, 0.5) 100%);
            border-bottom: 2px solid var(--gold-dark);
            padding: 15px;
            text-align: center;
            position: relative;
        }

        .column-box-title {
            font-family: 'Cinzel', serif;
            font-size: 1.3rem;
            color: var(--gold);
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .column-box-badges {
            font-size: 0.85rem;
            color: var(--gold-light);
            margin-top: 5px;
        }

        .column-box-progress {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 0.85rem;
            color: var(--gold-light);
        }

        /* Research Items in Column */
        .column-research-list {
            padding: 10px;
            flex: 1;
        }

        .column-research-item {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            margin-bottom: 8px;
            background: rgba(61, 41, 20, 0.5);
            border: 1px solid rgba(212, 175, 55, 0.2);
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .column-research-item:hover {
            background: rgba(61, 41, 20, 0.8);
            border-color: var(--gold);
        }

        .column-research-item.completed {
            border-color: var(--green);
        }

        .column-research-item.completed .research-checkbox {
            background: var(--green);
            border-color: var(--green-light);
        }

        .column-research-item.completed .research-checkbox::after {
            content: '✓';
            color: white;
            font-size: 12px;
        }

        .research-icon {
            width: 45px;
            height: 45px;
            border: 2px solid var(--gold-dark);
            background: rgba(0, 0, 0, 0.3);
            margin-right: 12px;
            flex-shrink: 0;
            overflow: hidden;
        }

        .research-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .research-checkbox {
            width: 24px;
            height: 24px;
            border: 2px solid var(--gold-dark);
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .research-info {
            flex: 1;
        }

        .research-name {
            font-family: 'Cinzel', serif;
            font-size: 0.95rem;
            color: var(--parchment);
        }

        .research-cost {
            font-size: 0.8rem;
            color: var(--gold);
        }

        .research-sequence {
            width: 26px;
            height: 26px;
            background: var(--gold);
            color: var(--brown-dark);
            font-family: 'Cinzel', serif;
            font-weight: 700;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin-left: 10px;
        }

        /* Legion Skill in Column */
        .column-legion-skill {
            margin: 10px;
            padding: 15px;
            background: linear-gradient(135deg, rgba(90, 61, 122, 0.3) 0%, rgba(45, 31, 15, 0.8) 100%);
            border: 1px solid var(--purple);
        }

        .column-legion-skill.locked {
            opacity: 0.5;
            border-style: dashed;
        }

        .column-legion-skill.unlocked {
            border-color: var(--purple-light);
            box-shadow: 0 0 15px rgba(139, 107, 171, 0.3);
        }

        .legion-skill-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .legion-skill-icon {
            width: 50px;
            height: 50px;
            border: 2px solid var(--purple);
            background: rgba(0, 0, 0, 0.3);
            overflow: hidden;
            flex-shrink: 0;
        }

        .legion-skill-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .legion-skill-icon-emoji {
            font-size: 1.5rem;
        }

        .legion-skill-title {
            font-family: 'Cinzel', serif;
            font-size: 0.9rem;
            color: var(--purple-light);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .legion-skill-name {
            font-family: 'Cinzel', serif;
            font-size: 1rem;
            color: var(--gold-light);
            font-weight: 600;
            margin-bottom: 8px;
        }

        .legion-skill-desc {
            font-size: 0.8rem;
            color: var(--parchment-dark);
            line-height: 1.4;
        }

        /* ===================================== */
        /* TOTAL BONUSES SECTION                */
        /* ===================================== */

        .bonuses-section {
            background: var(--brown-medium);
            border: 2px solid var(--gold-dark);
            padding: 20px;
            margin-top: 30px;
        }

        .bonuses-main-title {
            font-family: 'Cinzel', serif;
            color: var(--gold);
            font-size: 1.4rem;
            margin-bottom: 20px;
            text-align: center;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--gold-dark);
        }

        .bonus-category {
            margin-bottom: 20px;
            background: var(--brown-dark);
            border: 1px solid var(--gold-dark);
            overflow: hidden;
        }

        .bonus-category:last-child {
            margin-bottom: 0;
        }

        .bonus-category-header {
            background: linear-gradient(90deg, var(--brown-light) 0%, var(--brown-medium) 100%);
            padding: 12px 15px;
            border-bottom: 1px solid var(--gold-dark);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .bonus-category-icon {
            font-size: 1.3rem;
        }

        .bonus-category-title {
            font-family: 'Cinzel', serif;
            color: var(--gold);
            font-size: 1rem;
            flex: 1;
        }

        .bonus-category-desc {
            font-size: 0.75rem;
            color: var(--parchment-dark);
            font-style: italic;
        }

        .bonus-category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 10px;
            padding: 15px;
        }

        .bonus-item {
            background: var(--brown-medium);
            border: 1px solid rgba(212, 175, 55, 0.3);
            padding: 12px;
            text-align: center;
        }

        .bonus-name {
            font-size: 0.8rem;
            color: var(--parchment-dark);
            margin-bottom: 5px;
        }

        .bonus-value {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--green-light);
        }

        .bonus-value.negative {
            color: var(--red-light);
        }

        .no-bonus {
            padding: 20px;
            text-align: center;
            color: var(--parchment-dark);
            font-style: italic;
        }

        /* Category Colors */
        .bonus-category.general .bonus-category-header { border-left: 4px solid var(--gold); }
        .bonus-category.baseAttributes .bonus-category-header { border-left: 4px solid var(--blue-light); }
        .bonus-category.skill .bonus-category-header { border-left: 4px solid var(--green-light); }
        .bonus-category.nonSiege .bonus-category-header { border-left: 4px solid #5dade2; }
        .bonus-category.siege .bonus-category-header { border-left: 4px solid #8e44ad; }
        .bonus-category.siegeAttacks .bonus-category-header { border-left: 4px solid #e67e22; }
        .bonus-category.siegeDefense .bonus-category-header { border-left: 4px solid #9b59b6; }
        .bonus-category.roc .bonus-category-header { border-left: 4px solid #f4d03f; }
        .bonus-category.battlefield .bonus-category-header { border-left: 4px solid #e74c3c; }
        .bonus-category.rallyJoin .bonus-category-header { border-left: 4px solid #2ecc71; }
        .bonus-category.initiatingRally .bonus-category-header { border-left: 4px solid #f39c12; }
        .bonus-category.reinforcingAllies .bonus-category-header { border-left: 4px solid #16a085; }
        .bonus-category.marching .bonus-category-header { border-left: 4px solid #1abc9c; }
        .bonus-category.passiveSkills .bonus-category-header { border-left: 4px solid var(--purple-light); }
        .bonus-category.legionSkills .bonus-category-header { border-left: 4px solid var(--orange); }

        /* Missing Bonuses Section */
        .missing-section {
            background: var(--brown-dark);
        }

        .missing-subtitle {
            text-align: center;
            color: var(--parchment-dark);
            font-size: 0.9rem;
            margin-bottom: 20px;
            font-style: italic;
        }

        .missing-summary {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-bottom: 25px;
            padding: 15px;
            background: linear-gradient(135deg, var(--brown-medium) 0%, var(--brown-light) 100%);
            border: 1px solid var(--gold-dark);
            border-radius: 8px;
        }

        .missing-summary-item {
            text-align: center;
            padding: 12px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 6px;
        }

        .missing-summary-label {
            font-size: 0.7rem;
            color: var(--parchment-dark);
            text-transform: uppercase;
            margin-bottom: 5px;
        }

        .missing-summary-value {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--gold);
        }

        .missing-summary-value.highlight {
            color: var(--orange);
        }

        .missing-summary-value.complete {
            color: var(--green-light);
        }

        /* Missing Bonus Items */
        .bonus-category.missing-category .bonus-value {
            color: var(--orange);
        }

        .missing-research-source {
            font-size: 0.65rem;
            color: var(--parchment-dark);
            margin-top: 4px;
            font-style: italic;
        }

        .missing-category-tag {
            display: inline-block;
            background: var(--brown-dark);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.65rem;
            color: var(--gold);
            margin-left: auto;
        }

        .missing-empty {
            text-align: center;
            padding: 40px 20px;
            color: var(--green-light);
            font-size: 1.1rem;
        }

        .missing-empty-icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }

        /* Skills List */
        .skills-list {
            padding: 15px;
        }

        .skill-item {
            background: var(--brown-medium);
            border: 1px solid rgba(212, 175, 55, 0.3);
            padding: 15px;
            margin-bottom: 10px;
        }

        .skill-item:last-child {
            margin-bottom: 0;
        }

        .skill-item-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }

        .skill-item-icon {
            font-size: 1.2rem;
        }

        .skill-item-name {
            font-family: 'Cinzel', serif;
            font-size: 1rem;
            color: var(--gold-light);
        }

        .skill-item-source {
            font-size: 0.75rem;
            color: var(--parchment-dark);
            margin-left: auto;
        }

        .skill-item-desc {
            font-size: 0.85rem;
            color: var(--parchment);
            line-height: 1.5;
        }

        .skill-item.legion-skill {
            border-color: var(--orange);
            background: linear-gradient(135deg, rgba(196, 92, 38, 0.15) 0%, var(--brown-medium) 100%);
        }

        .skill-item.legion-skill .skill-item-name {
            color: var(--orange);
        }

        .skill-item.passive-skill {
            border-color: var(--purple);
            background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, var(--brown-medium) 100%);
        }

        .skill-item.passive-skill .skill-item-name {
            color: var(--purple-light);
        }

        /* ===================================== */
        /* MODAL                                */
        /* ===================================== */

        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 20px;
            overflow-y: auto;
        }

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

        .modal {
            background: linear-gradient(180deg, var(--brown-medium) 0%, var(--brown-dark) 100%);
            border: 3px solid var(--gold);
            max-width: 900px;
            width: 100%;
            max-height: 95vh;
            overflow-y: auto;
            position: relative;
        }

        .modal-header {
            background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-dark) 100%);
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .modal-title {
            font-family: 'Cinzel', serif;
            color: var(--brown-dark);
            font-size: 1.3rem;
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--brown-dark);
            font-size: 2rem;
            cursor: pointer;
            line-height: 1;
            padding: 0 10px;
        }

        .modal-close:hover {
            color: var(--red);
        }

        .modal-body {
            padding: 20px;
            overflow-y: auto;
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        .modal-body::-webkit-scrollbar {
            display: none;
        }

        .modal-progress-overview {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 25px;
        }

        .modal-stat {
            background: var(--brown-dark);
            border: 1px solid var(--gold-dark);
            padding: 15px;
            text-align: center;
        }

        .modal-stat-label {
            font-size: 0.8rem;
            color: var(--parchment-dark);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .modal-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--gold-light);
            margin-top: 5px;
        }

        .modal-stat-value.green {
            color: var(--green-light);
        }

        .modal-main-progress {
            margin-bottom: 25px;
        }

        .modal-main-progress-bar {
            height: 30px;
            background: var(--brown-dark);
            border: 2px solid var(--gold-dark);
            position: relative;
            overflow: hidden;
        }

        .modal-main-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
            transition: width 0.5s ease;
        }

        .modal-main-progress-markers {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            pointer-events: none;
        }

        .modal-main-progress-marker {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--brown-dark);
        }

        .modal-main-progress-marker::after {
            content: attr(data-percent);
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.75rem;
            color: var(--gold);
        }

        .modal-main-progress-text {
            text-align: center;
            margin-top: 25px;
            font-size: 1.2rem;
            color: var(--gold);
            font-family: 'Cinzel', serif;
        }

        .nodes-section {
            margin-bottom: 30px;
        }

        .nodes-section-title {
            font-family: 'Cinzel', serif;
            color: var(--gold);
            font-size: 1.1rem;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--gold-dark);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nodes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px;
        }

        .node-item {
            display: flex;
            align-items: center;
            padding: 12px;
            background: var(--brown-dark);
            border: 2px solid var(--gold-dark);
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .node-item:hover {
            border-color: var(--gold);
            background: rgba(212, 175, 55, 0.05);
        }

        .node-item.completed {
            border-color: var(--green);
            background: rgba(74, 156, 61, 0.15);
        }

        .node-item.completed .node-checkbox {
            background: var(--green);
            border-color: var(--green-light);
        }

        .node-item.completed .node-checkbox::after {
            content: '✓';
            color: white;
            font-size: 14px;
        }

        .node-checkbox {
            width: 28px;
            height: 28px;
            border: 2px solid var(--gold-dark);
            background: var(--brown-medium);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            flex-shrink: 0;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .node-info {
            flex: 1;
        }

        .node-name {
            font-family: 'Cinzel', serif;
            font-size: 0.9rem;
            color: var(--parchment);
            margin-bottom: 2px;
        }

        .node-effect {
            font-size: 0.85rem;
            color: var(--green-light);
            font-weight: 600;
        }

        .node-context {
            font-size: 0.7rem;
            color: var(--parchment-dark);
            font-style: italic;
        }

        .node-number {
            position: absolute;
            top: -8px;
            left: -8px;
            width: 22px;
            height: 22px;
            background: var(--gold);
            color: var(--brown-dark);
            font-family: 'Cinzel', serif;
            font-size: 0.75rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        .passive-skill-node {
            grid-column: 1 / -1;
            background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, var(--brown-dark) 100%);
            border-color: var(--purple);
        }

        .passive-skill-node:hover {
            border-color: var(--purple-light);
        }

        .passive-skill-node.completed {
            border-color: var(--purple-light);
            background: linear-gradient(135deg, rgba(138, 43, 226, 0.3) 0%, rgba(74, 156, 61, 0.15) 100%);
        }

        .passive-skill-node .node-checkbox {
            border-color: var(--purple);
        }

        .passive-skill-node.completed .node-checkbox {
            background: var(--purple);
            border-color: var(--purple-light);
        }

        .passive-skill-node .node-name {
            color: var(--purple-light);
        }

        .passive-skill-node .node-effect {
            color: var(--parchment-dark);
            font-weight: normal;
            font-size: 0.8rem;
            line-height: 1.4;
        }

        .skill-milestones {
            background: var(--brown-dark);
            border: 2px solid var(--gold);
            padding: 20px;
        }

        .skill-milestones-title {
            font-family: 'Cinzel', serif;
            color: var(--gold);
            font-size: 1.1rem;
            margin-bottom: 15px;
            text-align: center;
        }

        .skill-milestones-grid {
            display: flex;
            flex-direction: column;
        }

        .milestone-item {
            display: flex;
            align-items: center;
            padding: 12px;
            margin-bottom: 10px;
            background: var(--brown-medium);
            border: 1px solid var(--gold-dark);
            transition: all 0.3s ease;
        }

        .milestone-item:last-child {
            margin-bottom: 0;
        }

        .milestone-item.unlocked {
            border-color: var(--green);
            background: rgba(74, 156, 61, 0.15);
        }

        .milestone-item.unlocked .milestone-percent {
            background: var(--green);
            color: white;
        }

        .milestone-percent {
            width: 50px;
            height: 50px;
            background: var(--brown-dark);
            border: 2px solid var(--gold-dark);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Cinzel', serif;
            font-weight: 700;
            font-size: 0.85rem;
            color: var(--gold);
            margin-right: 15px;
            flex-shrink: 0;
        }

        .milestone-info {
            flex: 1;
        }

        .milestone-label {
            font-size: 0.8rem;
            color: var(--parchment-dark);
            margin-bottom: 3px;
        }

        .milestone-effect {
            font-size: 1rem;
            color: var(--gold-light);
            font-weight: 600;
        }

        .milestone-item.unlocked .milestone-effect {
            color: var(--green-light);
        }

        .milestone-status {
            font-size: 1.2rem;
            margin-left: 10px;
        }

        .milestone-checkbox {
            width: 28px;
            height: 28px;
            border: 2px solid var(--gold-dark);
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .milestone-checkbox.checked {
            background: var(--green);
            border-color: var(--green-light);
        }

        .milestone-checkbox.checked::after {
            content: '✓';
            color: white;
            font-size: 18px;
            font-weight: bold;
        }

        .modal-actions {
            display: flex;
            gap: 15px;
            margin-top: 25px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .modal-btn {
            font-family: 'Cinzel', serif;
            font-size: 0.9rem;
            padding: 12px 25px;
            border: 2px solid var(--gold);
            background: transparent;
            color: var(--gold);
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .modal-btn:hover {
            background: var(--gold);
            color: var(--brown-dark);
        }

        .modal-btn.danger {
            border-color: var(--red);
            color: var(--red-light);
        }

        .modal-btn.danger:hover {
            background: var(--red);
            color: white;
        }

        .modal-btn.success {
            border-color: var(--green);
            color: var(--green-light);
        }

        .modal-btn.success:hover {
            background: var(--green);
            color: white;
        }

        .footer {
            text-align: center;
            padding: 30px;
            border-top: 1px solid var(--gold-dark);
            margin-top: 30px;
        }

        .footer p {
            color: var(--parchment-dark);
            font-size: 0.9rem;
        }

        /* Bonus Detail Modal */
        /* ============================================= */
        /* BONUS DETAIL MODAL                           */
        /* Posicionamento controlado por JavaScript     */
        /* ============================================= */
        .bonus-detail-overlay {
            display: none;
            background: rgba(0, 0, 0, 0.95);
            z-index: 99999999;
        }

        .bonus-detail-overlay.show {
            display: flex !important;
        }

        .bonus-detail-modal {
            background: linear-gradient(180deg, #2a2015 0%, #1a1510 100%);
            border: 2px solid #8b7355;
            border-radius: 12px;
            padding: 20px;
            width: 90%;
            max-width: 400px;
            overflow-y: auto;
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        .bonus-detail-modal::-webkit-scrollbar {
            display: none;
        }

        .bonus-detail-close {
            position: absolute;
            top: 10px;
            right: 15px;
            background: none;
            border: none;
            color: #c9a959;
            font-size: 24px;
            cursor: pointer;
            transition: color 0.2s;
        }

        .bonus-detail-close:hover {
            color: #fff;
        }

        .bonus-detail-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding-bottom: 15px;
            border-bottom: 1px solid #8b7355;
            margin-bottom: 15px;
        }

        .bonus-detail-icon {
            font-size: 24px;
        }

        .bonus-detail-title {
            color: #c9a959;
            font-size: 18px;
            font-weight: bold;
            font-family: 'Cinzel', serif;
        }

        .bonus-detail-sources {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .bonus-source-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 12px;
            background: rgba(139, 115, 85, 0.15);
            border-radius: 6px;
            border-left: 3px solid #8b7355;
        }

        .bonus-source-name {
            color: #d4c4a8;
            font-size: 14px;
        }

        .bonus-source-value {
            color: #4ade80;
            font-weight: bold;
            font-size: 14px;
        }

        .bonus-source-total {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: linear-gradient(90deg, rgba(201, 169, 89, 0.2), rgba(139, 115, 85, 0.3));
            border-radius: 6px;
            border: 1px solid #c9a959;
            margin-top: 10px;
        }

        .bonus-source-total span:first-child {
            color: #c9a959;
            font-weight: bold;
            font-family: 'Cinzel', serif;
        }

        .bonus-total-value {
            color: #4ade80;
            font-weight: bold;
            font-size: 16px;
        }

        .bonus-detail-empty {
            color: #8b7355;
            text-align: center;
            padding: 20px;
            font-style: italic;
        }

        /* Missing Bonus Detail Styles */
        .bonus-detail-missing-tag {
            background: var(--orange);
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 600;
            margin-left: auto;
        }

        .missing-detail-group {
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid var(--gold-dark);
            border-radius: 8px;
            margin-bottom: 12px;
            overflow: hidden;
        }

        .missing-detail-research {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: linear-gradient(90deg, var(--brown-light) 0%, var(--brown-medium) 100%);
            border-bottom: 1px solid var(--gold-dark);
        }

        .missing-detail-column {
            background: var(--gold-dark);
            color: var(--brown-dark);
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 700;
            white-space: nowrap;
        }

        .missing-detail-research-name {
            flex: 1;
            color: var(--gold);
            font-weight: 600;
            font-size: 0.9rem;
        }

        .missing-detail-research-total {
            color: var(--orange);
            font-weight: 700;
            font-size: 0.9rem;
        }

        .missing-detail-nodes {
            padding: 8px 12px;
        }

        .missing-detail-node {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 0;
            border-bottom: 1px solid rgba(212, 175, 55, 0.1);
        }

        .missing-detail-node:last-child {
            border-bottom: none;
        }

        .missing-detail-node-icon {
            font-size: 0.8rem;
        }

        .missing-detail-node-name {
            flex: 1;
            color: var(--parchment-dark);
            font-size: 0.8rem;
        }

        .missing-detail-node-value {
            color: var(--orange);
            font-weight: 600;
            font-size: 0.85rem;
        }

        .missing-total {
            background: rgba(200, 100, 50, 0.2);
            border-color: var(--orange);
        }

        .missing-total .bonus-total-value {
            color: var(--orange);
        }

        .bonus-item-clickable {
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .bonus-item-clickable:hover {
            background: rgba(201, 169, 89, 0.25);
            transform: translateX(3px);
        }

        /* ===================================== */
        /* RESPONSIVE - MOBILE OPTIMIZED        */
        /* ===================================== */

        @media screen and (max-width: 768px) {
            /* Header Mobile */
            .header {
                padding: 15px 10px;
                background: linear-gradient(180deg, var(--brown-medium) 0%, var(--brown-dark) 100%);
            }

            .header h1 {
                font-size: 1.15rem;
                letter-spacing: 1px;
            }

            .header-subtitle {
                font-size: 0.75rem;
                margin-top: 5px;
            }

            .container {
                padding: 10px;
            }

            /* ==================== */
            /* Troop Selector Mobile - Beautiful Cards */
            /* ==================== */
            .troop-selector {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
                margin: 12px 0;
                padding: 0;
            }

            .troop-btn {
                flex-direction: column;
                padding: 15px 8px;
                font-size: 0.75rem;
                gap: 8px;
                text-align: center;
                border-radius: 8px;
                background: linear-gradient(180deg, rgba(45, 31, 15, 0.95) 0%, rgba(26, 18, 9, 0.98) 100%);
            }

            .troop-btn-icon {
                width: 40px;
                height: 40px;
            }

            .troop-btn.footman.active {
                background: linear-gradient(180deg, rgba(74, 144, 217, 0.2) 0%, rgba(26, 18, 9, 0.98) 100%);
            }

            .troop-btn.archer.active {
                background: linear-gradient(180deg, rgba(92, 184, 92, 0.2) 0%, rgba(26, 18, 9, 0.98) 100%);
            }

            .troop-btn.cavalry.active {
                background: linear-gradient(180deg, rgba(217, 83, 79, 0.2) 0%, rgba(26, 18, 9, 0.98) 100%);
            }

            /* ==================== */
            /* Stats Cards Mobile - Compact Grid */
            /* ==================== */
            .stats-cards {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                margin: 12px 0;
            }

            .stat-card {
                padding: 12px 8px;
                border-radius: 8px;
            }

            .stat-card-title {
                font-size: 0.6rem;
                letter-spacing: 0.5px;
                margin-bottom: 6px;
            }

            .stat-card-value {
                font-size: 1.2rem;
            }

            .stat-card-subtitle {
                font-size: 0.65rem;
                margin-top: 4px;
            }

            /* ==================== */
            /* Progress Bar Mobile */
            /* ==================== */
            .total-progress-section {
                padding: 12px;
                margin: 12px 0;
                border-radius: 8px;
            }

            .total-progress-header {
                margin-bottom: 8px;
            }

            .total-progress-title {
                font-size: 0.85rem;
            }

            .total-progress-percent {
                font-size: 1rem;
            }

            .total-progress-bar {
                height: 12px;
                border-radius: 6px;
            }

            .total-progress-fill {
                border-radius: 6px;
            }

            /* ==================== */
            /* View Tabs Mobile - Horizontal Scroll */
            /* ==================== */
            /* ==================== */
            /* View Tabs Mobile - Grid 2x2 */
            /* ==================== */
            /* ==================== */
            /* View Tabs Mobile - Grid 2x2 */
            /* ==================== */
            .view-tabs {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                margin: 15px 0;
                padding: 0;
            }

            .view-tab {
                padding: 12px 8px;
                font-size: 0.7rem;
                border-radius: 8px;
                text-align: center;
                display: flex;
                align-items: center;
                justify-content: center;
                white-space: normal;
                line-height: 1.2;
            }

            /* ==================== */
            /* Columns Grid Mobile - Single Column */
            /* ==================== */
            .columns-container {
                display: flex;
                flex-direction: column;
                gap: 15px;
            }

            .column-box {
                border-radius: 10px;
                overflow: hidden;
            }

            .column-header {
                padding: 12px 15px;
            }

            .column-title {
                font-size: 1rem;
            }

            .column-box-badges {
                font-size: 0.7rem;
                margin-top: 4px;
            }

            .column-progress-bar {
                height: 6px;
            }

            /* ==================== */
            /* Research Items Mobile */
            /* ==================== */
            .column-research-list {
                padding: 8px;
            }

            .column-research-item {
                padding: 10px;
                margin-bottom: 6px;
                border-radius: 6px;
                display: flex;
                align-items: center;
            }

            .research-icon {
                width: 40px;
                height: 40px;
                margin-right: 10px;
                border-radius: 4px;
            }

            .research-checkbox {
                width: 22px;
                height: 22px;
                margin-right: 10px;
                border-radius: 4px;
            }

            .research-info {
                flex: 1;
                min-width: 0;
            }

            .research-name {
                font-size: 0.85rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .research-cost {
                font-size: 0.7rem;
            }

            .research-sequence {
                width: 24px;
                height: 24px;
                font-size: 0.7rem;
                margin-left: 8px;
            }

            /* ==================== */
            /* Legion Skill Mobile */
            /* ==================== */
            .column-legion-skill {
                margin: 8px;
                padding: 12px;
                border-radius: 8px;
            }

            .legion-skill-header {
                gap: 10px;
                margin-bottom: 8px;
            }

            .legion-skill-icon {
                width: 45px;
                height: 45px;
                border-radius: 6px;
            }

            .legion-skill-title {
                font-size: 0.75rem;
            }

            .legion-skill-name {
                font-size: 0.9rem;
                margin-bottom: 6px;
            }

            .legion-skill-desc {
                font-size: 0.75rem;
                line-height: 1.3;
            }

            /* ==================== */
            /* Path Recommendation Mobile */
            /* ==================== */
            .path-recommendation {
                padding: 15px;
                border-radius: 10px;
            }

            .path-header {
                margin-bottom: 15px;
            }

            .path-title {
                font-size: 1.15rem;
                margin-bottom: 6px;
            }

            .path-subtitle {
                font-size: 0.8rem;
            }

            .path-selector {
                flex-direction: column;
                gap: 10px;
                margin-top: 15px;
            }

            .path-option {
                display: flex;
                flex-direction: row;
                align-items: center;
                text-align: left;
                padding: 12px 15px;
                min-width: auto;
                max-width: none;
                border-radius: 8px;
                gap: 12px;
            }

            .path-option-icon {
                font-size: 1.8rem;
                margin-bottom: 0;
            }

            .path-option-content {
                flex: 1;
            }

            .path-option-name {
                font-size: 0.95rem;
                margin-bottom: 2px;
            }

            .path-option-desc {
                font-size: 0.75rem;
            }

            .path-option-text {
                flex: 1;
            }

            /* Path Progress Summary Mobile */
            .path-progress-summary {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                padding: 12px;
                margin: 15px 0;
                border-radius: 8px;
            }

            .path-summary-item {
                padding: 8px;
                background: rgba(0, 0, 0, 0.2);
                border-radius: 6px;
            }

            .path-summary-label {
                font-size: 0.6rem;
                margin-bottom: 4px;
            }

            .path-summary-value {
                font-size: 1rem;
            }

            /* Path List Mobile */
            .path-list-header {
                font-size: 0.9rem;
                margin-bottom: 10px;
                padding-bottom: 8px;
            }

            .path-list > p {
                font-size: 0.75rem !important;
                margin-bottom: 12px !important;
            }

            /* Path Items Mobile - Super Compact */
            .path-item {
                padding: 8px;
                margin-bottom: 4px;
                border-radius: 6px;
                display: flex;
                align-items: center;
                gap: 6px;
            }

            .path-item-number {
                width: 22px;
                height: 22px;
                font-size: 0.65rem;
                flex-shrink: 0;
            }

            .path-item-icon {
                width: 28px;
                height: 28px;
                border-radius: 3px;
                flex-shrink: 0;
            }

            .path-item-info {
                flex: 1;
                min-width: 0;
                overflow: hidden;
            }

            .path-item-name {
                font-size: 0.7rem;
                margin-bottom: 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .path-item-details {
                font-size: 0.55rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .path-item-column {
                font-size: 0.5rem;
                padding: 1px 3px;
                border-radius: 2px;
                margin-right: 3px;
            }

            .path-item-bonuses {
                display: none;
            }

            .path-item-progress {
                text-align: center;
                font-size: 0.6rem;
                flex-shrink: 0;
                width: 28px;
            }

            .path-item-progress-bar {
                width: 28px;
                height: 2px;
                border-radius: 1px;
                margin-top: 1px;
            }

            .path-item-status {
                font-size: 0.5rem;
                padding: 2px 4px;
                border-radius: 3px;
                text-align: center;
                flex-shrink: 0;
                min-width: 40px;
            }

            .path-legend {
                gap: 10px;
                margin-top: 10px;
                padding-top: 8px;
                justify-content: center;
                flex-wrap: wrap;
            }

            .path-legend-item {
                font-size: 0.6rem;
            }

            .path-legend-dot {
                width: 8px;
                height: 8px;
            }

            .path-legend-dot {
                width: 10px;
                height: 10px;
            }

            /* ==================== */
            /* Attribute Tracker Mobile */
            /* ==================== */
            .attribute-tracker {
                padding: 15px;
                border-radius: 10px;
            }

            .tracker-header {
                margin-bottom: 15px;
            }

            .tracker-title {
                font-size: 1.1rem;
                margin-bottom: 12px;
            }

            .tracker-filters {
                flex-direction: column;
                gap: 10px;
            }

            .tracker-filter-group {
                width: 100%;
            }

            .tracker-filter-label {
                font-size: 0.7rem;
                margin-bottom: 4px;
            }

            .tracker-select {
                width: 100%;
                min-width: auto;
                padding: 10px 12px;
                font-size: 0.85rem;
                border-radius: 6px;
            }

            .tracker-results {
                margin-top: 15px;
            }

            .tracker-results-title {
                font-size: 0.9rem;
                margin-bottom: 12px;
            }

            .tracker-result-item {
                padding: 12px;
                margin-bottom: 8px;
                border-radius: 8px;
            }

            .tracker-research-name {
                font-size: 0.9rem;
                margin-bottom: 4px;
            }

            .tracker-research-column {
                font-size: 0.7rem;
                margin-bottom: 8px;
            }

            .tracker-nodes-list {
                gap: 6px;
            }

            .tracker-node-badge {
                font-size: 0.7rem;
                padding: 5px 8px;
                border-radius: 4px;
            }

            .tracker-total {
                margin-top: 15px;
                padding: 12px;
                border-radius: 8px;
            }

            .tracker-total-label {
                font-size: 0.75rem;
            }

            .tracker-total-value {
                font-size: 1.2rem;
            }

            .tracker-no-results {
                padding: 20px;
                font-size: 0.85rem;
            }

            /* ==================== */
            /* Bonuses View Mobile */
            /* ==================== */
            .bonuses-section {
                padding: 0;
                margin-top: 15px;
                border-width: 1px;
            }

            .bonuses-main-title {
                font-size: 1rem;
                margin-bottom: 12px;
                padding: 10px 10px 8px;
                border-bottom-width: 1px;
            }

            /* Bonus Category - Compact */
            .bonus-category {
                margin-bottom: 10px;
                border-radius: 6px;
                overflow: hidden;
            }

            .bonus-category-header {
                padding: 8px 10px;
                gap: 8px;
            }

            .bonus-category-icon {
                font-size: 1rem;
            }

            .bonus-category-title {
                font-size: 0.75rem;
            }

            .bonus-category-desc {
                font-size: 0.55rem;
                display: none;
            }

            /* Bonus Grid - 2 columns compact */
            .bonus-category-grid {
                display: grid !important;
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 6px !important;
                padding: 8px !important;
            }

            /* Bonus Item - Super Compact */
            .bonus-item {
                padding: 8px 6px !important;
                border-radius: 4px;
                background: var(--brown-medium);
                border: 1px solid rgba(212, 175, 55, 0.2);
            }

            .bonus-name {
                font-size: 0.65rem !important;
                margin-bottom: 2px !important;
                line-height: 1.2;
                color: var(--parchment-dark);
            }

            .bonus-value {
                font-size: 0.9rem !important;
                font-weight: 700;
            }

            .no-bonus {
                padding: 15px 10px;
                font-size: 0.7rem;
            }

            /* Missing Bonuses Mobile - Compact */
            .missing-section {
                margin-top: 15px;
            }

            .missing-subtitle {
                font-size: 0.7rem;
                margin-bottom: 12px;
                padding: 0 10px;
            }

            .missing-summary {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                padding: 10px;
                margin: 0 0 15px 0;
                border-radius: 6px;
            }

            .missing-summary-item {
                padding: 8px 6px;
                border-radius: 4px;
            }

            .missing-summary-label {
                font-size: 0.5rem;
                margin-bottom: 3px;
            }

            .missing-summary-value {
                font-size: 1rem;
            }

            .missing-category-tag {
                font-size: 0.5rem;
                padding: 2px 5px;
                border-radius: 8px;
            }

            .missing-research-source {
                font-size: 0.5rem;
                line-height: 1.2;
                margin-top: 2px;
            }

            .missing-empty {
                padding: 25px 15px;
                font-size: 0.85rem;
            }

            .missing-empty-icon {
                font-size: 2rem;
                margin-bottom: 8px;
            }

            /* Missing Bonus Detail Mobile */
            .bonus-detail-missing-tag {
                font-size: 0.6rem;
                padding: 2px 6px;
            }

            .missing-detail-group {
                margin-bottom: 10px;
                border-radius: 6px;
            }

            .missing-detail-research {
                padding: 8px 10px;
                gap: 8px;
                flex-wrap: wrap;
            }

            .missing-detail-column {
                font-size: 0.6rem;
                padding: 2px 6px;
            }

            .missing-detail-research-name {
                font-size: 0.75rem;
                flex-basis: 100%;
                order: 3;
                margin-top: 4px;
            }

            .missing-detail-research-total {
                font-size: 0.8rem;
            }

            .missing-detail-nodes {
                padding: 6px 10px;
            }

            .missing-detail-node {
                padding: 5px 0;
                gap: 6px;
            }

            .missing-detail-node-icon {
                font-size: 0.7rem;
            }

            .missing-detail-node-name {
                font-size: 0.7rem;
            }

            .missing-detail-node-value {
                font-size: 0.75rem;
            }

            /* Skills List - Compact */
            .skills-list {
                padding: 8px !important;
            }

            .skill-item {
                padding: 8px !important;
                margin-bottom: 6px !important;
                border-radius: 4px;
            }

            .skill-item-header {
                gap: 6px !important;
                margin-bottom: 4px !important;
            }

            .skill-item-icon {
                font-size: 0.9rem !important;
            }

            .skill-item-name {
                font-size: 0.7rem !important;
            }

            .skill-item-source {
                font-size: 0.5rem !important;
                padding: 2px 5px !important;
            }

            .skill-item-desc {
                font-size: 0.6rem !important;
                line-height: 1.3 !important;
            }

            /* ==================== */
            /* Bonus Detail Modal Mobile */
            /* ==================== */
            .bonus-detail-modal {
                width: calc(100% - 30px);
                max-width: 100%;
                padding: 15px;
                border-radius: 10px;
            }

            .bonus-detail-header {
                padding-bottom: 10px;
                margin-bottom: 10px;
                gap: 8px;
                flex-wrap: wrap;
            }

            .bonus-detail-icon {
                font-size: 1.2rem;
            }

            .bonus-detail-title {
                font-size: 0.95rem;
                flex: 1;
                min-width: 0;
            }

            .bonus-detail-close {
                top: 8px;
                right: 10px;
                font-size: 22px;
            }

            .bonus-source-item {
                padding: 8px 10px;
            }

            .bonus-source-name {
                font-size: 0.8rem;
            }

            .bonus-source-value {
                font-size: 0.85rem;
            }

            .bonus-source-total {
                padding: 10px;
                margin-top: 10px;
            }

            /* ==================== */
            /* Modal Mobile - Full Screen */
            /* ==================== */
            .modal-overlay {
                padding: 0;
                align-items: flex-start;
            }

            .modal {
                width: 100%;
                max-width: 100%;
                height: 100%;
                max-height: 100%;
                margin: 0;
                border-radius: 0;
                display: flex;
                flex-direction: column;
            }

            .modal-header {
                padding: 10px 15px;
                flex-shrink: 0;
                position: sticky;
                top: 0;
                z-index: 10;
                background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-dark) 100%);
            }

            .modal-title {
                font-size: 0.9rem;
                color: var(--brown-dark);
            }

            .modal-close {
                width: 28px;
                height: 28px;
                font-size: 1.2rem;
                color: var(--brown-dark);
            }

            .modal-body {
                padding: 10px;
                flex: 1;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                -ms-overflow-style: none;
                scrollbar-width: none;
            }

            .modal-body::-webkit-scrollbar {
                display: none;
            }

            /* Modal Progress Overview Mobile - Compact with gold border */
            .modal-progress-overview {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 6px;
                margin-bottom: 10px;
            }

            .modal-stat {
                padding: 8px 4px;
                text-align: center;
                border-radius: 4px;
                background: var(--brown-dark);
                border: 1px solid var(--gold-dark);
            }

            .modal-stat-label {
                font-size: 0.5rem;
                margin-bottom: 3px;
                text-transform: uppercase;
                color: var(--parchment-dark);
            }

            .modal-stat-value {
                font-size: 0.9rem;
                color: var(--gold-light);
                font-weight: 700;
            }

            .modal-stat-value.green {
                color: var(--green-light);
            }

            /* Modal Progress Bar Mobile */
            .modal-main-progress {
                margin-bottom: 10px;
            }

            .modal-main-progress-bar {
                height: 14px;
                border-radius: 7px;
            }

            .modal-main-progress-text {
                font-size: 0.65rem;
                margin-top: 4px;
            }

            .modal-main-progress-marker::after {
                font-size: 0.5rem !important;
            }

            /* Nodes Section Mobile - 3 columns grid */
            .nodes-section {
                margin-bottom: 10px;
            }

            .nodes-section-title {
                font-size: 0.75rem;
                margin-bottom: 8px;
                padding-bottom: 6px;
                border-bottom: 1px solid var(--gold);
            }

            .nodes-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 4px;
            }

            .node-item {
                padding: 6px;
                border-radius: 4px;
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                position: relative;
                border-width: 1px;
            }

            .node-number {
                position: absolute;
                top: -4px;
                left: -4px;
                width: 14px;
                height: 14px;
                font-size: 0.5rem;
            }

            .node-checkbox {
                width: 22px;
                height: 22px;
                margin-right: 0;
                margin-bottom: 3px;
            }

            .node-checkbox::after {
                font-size: 10px !important;
            }

            .node-info {
                width: 100%;
            }

            .node-name {
                font-size: 0.55rem;
                margin-bottom: 1px;
                line-height: 1.1;
            }

            .node-effect {
                font-size: 0.5rem;
                line-height: 1.1;
            }

            .node-context {
                display: none;
            }

            /* Passive Skill Node Mobile */
            .passive-skill-node {
                grid-column: 1 / -1;
                flex-direction: row;
                text-align: left;
                padding: 8px;
            }

            .passive-skill-node .node-checkbox {
                margin-right: 8px;
                margin-bottom: 0;
            }

            .passive-skill-node .node-name {
                font-size: 0.65rem;
                color: var(--purple-light);
            }

            .passive-skill-node .node-effect {
                font-size: 0.55rem;
                line-height: 1.2;
            }

            /* Skill Milestones Mobile - Vertical List Like Image Reference */
            .skill-milestones {
                margin-top: 10px;
                padding: 12px;
                border-radius: 6px;
                background: rgba(0, 0, 0, 0.3);
                border: 2px solid var(--gold);
            }

            .skill-milestones-title {
                font-size: 0.8rem;
                margin-bottom: 12px;
                text-align: center;
                color: var(--gold);
            }

            .skill-milestones-grid {
                display: flex !important;
                flex-direction: column !important;
                gap: 8px !important;
            }

            .milestone-item {
                display: flex !important;
                flex-direction: row !important;
                align-items: center !important;
                padding: 12px !important;
                margin-bottom: 0 !important;
                border-radius: 6px;
                background: rgba(45, 31, 15, 0.9);
                border: 1px solid var(--gold-dark);
                gap: 12px !important;
            }

            .milestone-percent {
                width: 42px !important;
                height: 42px !important;
                min-width: 42px !important;
                font-size: 0.7rem !important;
                padding: 0 !important;
                border-radius: 50% !important;
                background: var(--brown-dark);
                border: 2px solid var(--gold-dark);
                color: var(--gold);
                margin-right: 0 !important;
                margin-bottom: 0 !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                flex-shrink: 0 !important;
                font-weight: 700;
            }

            .milestone-info {
                flex: 1 !important;
                min-width: 0;
            }

            .milestone-label {
                display: none !important;
            }

            .milestone-effect {
                font-size: 0.75rem !important;
                color: var(--gold-light);
                line-height: 1.4;
            }

            .milestone-status {
                margin-left: auto !important;
                flex-shrink: 0 !important;
            }

            .milestone-item.unlocked {
                background: rgba(74, 156, 61, 0.2);
                border-color: var(--green);
            }

            .milestone-item.unlocked .milestone-percent {
                background: var(--green);
                border-color: var(--green-light);
                color: white;
            }

            .milestone-item.unlocked .milestone-effect {
                color: var(--green-light);
            }

            /* Milestone Checkbox */
            .milestone-checkbox {
                width: 24px;
                height: 24px;
                border: 2px solid var(--gold-dark);
                border-radius: 4px;
                background: rgba(0, 0, 0, 0.3);
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
            }

            .milestone-checkbox.checked {
                background: var(--green);
                border-color: var(--green-light);
            }

            .milestone-checkbox.checked::after {
                content: '✓';
                color: white;
                font-size: 14px;
                font-weight: bold;
            }

            /* Modal Actions Mobile */
            .modal-actions {
                display: flex;
                gap: 6px;
                margin-top: 10px;
                padding-top: 8px;
                border-top: 1px solid var(--gold-dark);
            }

            .modal-btn {
                flex: 1;
                padding: 10px 8px;
                font-size: 0.7rem;
                border-radius: 4px;
            }

            /* ==================== */
            /* Footer Mobile */
            /* ==================== */
            .footer {
                padding: 15px;
                font-size: 0.75rem;
            }
        }

        /* ===================================== */
        /* EXTRA SMALL DEVICES (< 400px)        */
        /* ===================================== */

        @media screen and (max-width: 400px) {
            .header h1 {
                font-size: 1rem;
            }

            .troop-btn {
                padding: 10px 5px;
                font-size: 0.65rem;
            }

            .troop-btn-icon {
                width: 32px;
                height: 32px;
            }

            .stat-card-title {
                font-size: 0.5rem;
            }

            .stat-card-value {
                font-size: 0.95rem;
            }

            /* View Tabs 2x2 para telas pequenas também */
            .view-tabs {
                gap: 6px;
            }

            .view-tab {
                padding: 10px 6px;
                font-size: 0.6rem;
            }

            .path-option {
                padding: 10px;
                gap: 8px;
            }

            .path-option-icon {
                font-size: 1.4rem;
            }

            .path-option-name {
                font-size: 0.8rem;
            }

            .path-option-desc {
                font-size: 0.65rem;
            }

            .path-item {
                padding: 6px 8px;
                gap: 6px;
            }

            .path-item-number {
                width: 22px;
                height: 22px;
                font-size: 0.65rem;
            }

            .path-item-icon {
                width: 28px;
                height: 28px;
            }

            .path-item-name {
                font-size: 0.7rem;
            }

            .path-item-details {
                font-size: 0.55rem;
            }

            .path-item-progress {
                font-size: 0.6rem;
                min-width: 25px;
            }

            .path-item-status {
                font-size: 0.5rem;
                padding: 2px 4px;
                min-width: 40px;
            }

            /* Modal mobile extra pequeno - 3 colunas */
            .node-item {
                padding: 5px;
            }

            .node-checkbox {
                width: 18px;
                height: 18px;
            }

            .node-name {
                font-size: 0.5rem;
            }

            .node-effect {
                font-size: 0.45rem;
            }

            .node-number {
                width: 12px;
                height: 12px;
                font-size: 0.45rem;
            }

            /* Milestones extra small - keep row layout */
            .milestone-item {
                padding: 10px !important;
                gap: 10px !important;
            }

            .milestone-percent {
                width: 36px !important;
                height: 36px !important;
                min-width: 36px !important;
                font-size: 0.6rem !important;
            }

            .milestone-effect {
                font-size: 0.7rem !important;
            }

            .milestone-checkbox {
                width: 20px;
                height: 20px;
            }

            /* Bonus - Extra Small Screens */
            .bonuses-main-title {
                font-size: 0.9rem;
                padding: 8px;
            }

            .bonus-category-header {
                padding: 6px 8px;
            }

            .bonus-category-icon {
                font-size: 0.9rem;
            }

            .bonus-category-title {
                font-size: 0.7rem;
            }

            .bonus-category-grid {
                gap: 4px !important;
                padding: 6px !important;
            }

            .bonus-item {
                padding: 6px 4px !important;
            }

            .bonus-name {
                font-size: 0.6rem !important;
            }

            .bonus-value {
                font-size: 0.8rem !important;
            }

            .missing-summary {
                gap: 6px;
                padding: 8px;
            }

            .missing-summary-item {
                padding: 6px 4px;
            }

            .missing-summary-label {
                font-size: 0.45rem;
            }

            .missing-summary-value {
                font-size: 0.9rem;
            }

            .missing-research-source {
                font-size: 0.45rem;
            }

            .skill-item {
                padding: 6px !important;
            }

            .skill-item-name {
                font-size: 0.65rem !important;
            }

            .skill-item-desc {
                font-size: 0.55rem !important;
            }
        }

        /* ============================================
           HEADER PADRONIZADO - ROCAcademy Tools
           ============================================ */
        .medieval-header {
            background: linear-gradient(180deg, #3d2914 0%, #1a1209 100%);
            border-bottom: 3px solid #d4af37;
            padding: 0;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }

        .medieval-header .header-wrap {
            max-width: 1200px;
            margin: 0 auto;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .medieval-header .logo h1 {
            font-family: 'Cinzel', serif;
            font-size: clamp(1rem, 3vw, 1.5rem);
            color: #d4af37;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            letter-spacing: 1px;
            margin: 0;
        }

        .medieval-header .logo .subtitle {
            color: #f4e4a6;
            opacity: 0.8;
            font-size: 0.75rem;
            margin: 2px 0 0;
        }

        .main-nav {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .nav-link {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            background: rgba(212, 175, 55, 0.1);
            border: 1px solid rgba(212, 175, 55, 0.4);
            border-radius: 6px;
            color: #d4af37;
            text-decoration: none;
            font-family: 'Cinzel', serif;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.5px;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .nav-link:hover {
            background: rgba(212, 175, 55, 0.25);
            border-color: #d4af37;
            box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
            transform: translateY(-1px);
        }

        .nav-icon {
            width: 20px;
            height: 20px;
            object-fit: contain;
            border-radius: 3px;
        }

        /* ============================================
           FOOTER PADRONIZADO
           ============================================ */
        .medieval-footer {
            background: linear-gradient(180deg, #1a1209 0%, #0d0b08 100%);
            border-top: 2px solid rgba(212, 175, 55, 0.3);
            padding: 24px 20px;
            margin-top: 30px;
            text-align: center;
        }

        .medieval-footer .footer-logo-img {
            height: 36px;
            opacity: 0.8;
            margin-bottom: 10px;
        }

        .medieval-footer .footer-text p {
            color: #d4c4a8;
            font-size: 0.75rem;
            opacity: 0.7;
            margin: 4px 0;
            line-height: 1.5;
        }

        .medieval-footer .footer-text strong {
            color: #d4af37;
            opacity: 1;
        }

        .medieval-footer .copyright {
            opacity: 0.5;
            font-size: 0.7rem;
        }

        /* Esconder header e footer originais */
        .header { display: none !important; }
        .footer { display: none !important; }

        @media (max-width: 480px) {
            .main-nav .nav-text { display: none; }
            .nav-link { padding: 7px 10px; }
        }

        /* ============================================
           SAVE / LOAD PANEL
           ============================================ */
        .stp-save-panel {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            background: rgba(25, 18, 9, 0.95);
            border: 1px solid rgba(212, 175, 55, 0.25);
            border-radius: 10px;
            padding: 10px 16px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }

        .stp-save-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .stp-save-label {
            font-family: 'Cinzel', serif;
            font-size: 0.8rem;
            color: #d4af37;
            font-weight: 600;
            white-space: nowrap;
        }

        .stp-save-status {
            font-size: 0.75rem;
            color: #f4e4a6;
            opacity: 0.8;
        }

        .stp-save-right {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .stp-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid rgba(212, 175, 55, 0.4);
            background: rgba(212, 175, 55, 0.08);
            color: #d4af37;
            font-size: 0.75rem;
            font-family: 'Cinzel', serif;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            white-space: nowrap;
        }

        .stp-btn:hover {
            background: rgba(212, 175, 55, 0.2);
            border-color: #d4af37;
            transform: translateY(-1px);
        }

        .stp-btn-reset {
            border-color: rgba(139, 37, 0, 0.5);
            color: #c44536;
            background: rgba(139, 37, 0, 0.08);
        }

        .stp-btn-reset:hover {
            background: rgba(139, 37, 0, 0.2);
            border-color: #c44536;
        }

        .stp-btn-export { border-color: rgba(74, 156, 61, 0.5); color: #4a9c3d; background: rgba(74, 156, 61, 0.08); }
        .stp-btn-export:hover { background: rgba(74, 156, 61, 0.2); border-color: #4a9c3d; }
        .stp-btn-import { border-color: rgba(61, 122, 184, 0.5); color: #3d7ab8; background: rgba(61, 122, 184, 0.08); }
        .stp-btn-import:hover { background: rgba(61, 122, 184, 0.2); border-color: #3d7ab8; }
        .stp-btn-cloud {
            border-color: rgba(217, 179, 90, 0.6);
            color: #d9b35a;
            background: rgba(217, 179, 90, 0.12);
            font-weight: 700;
        }
        .stp-btn-cloud:hover { background: rgba(217, 179, 90, 0.25); border-color: #d9b35a; }
        .stp-btn-cloud:disabled { opacity: 0.5; cursor: not-allowed; }

        /* Undo/Redo */
        .stp-btn-undo { border-color: rgba(180,140,80,0.5); color: #c9a84c; background: rgba(180,140,80,0.08); }
        .stp-btn-undo:hover:not(:disabled) { background: rgba(180,140,80,0.2); border-color: #c9a84c; }
        .stp-btn-undo:disabled { opacity: 0.3; cursor: not-allowed; }

        /* Filter */
        .stp-btn-filter { border-color: rgba(100,160,220,0.5); color: #6ab0f5; background: rgba(100,160,220,0.08); }
        .stp-btn-filter:hover { background: rgba(100,160,220,0.2); border-color: #6ab0f5; }
        .stp-btn-filter.active { background: rgba(100,160,220,0.25); border-color: #6ab0f5; color: #fff; }

        /* Share */
        .stp-btn-share { border-color: rgba(160,100,220,0.5); color: #b07af5; background: rgba(160,100,220,0.08); }
        .stp-btn-share:hover { background: rgba(160,100,220,0.2); border-color: #b07af5; }

        /* Compare */
        .stp-btn-compare { border-color: rgba(220,160,60,0.5); color: #e0a83c; background: rgba(220,160,60,0.08); }
        .stp-btn-compare:hover { background: rgba(220,160,60,0.2); border-color: #e0a83c; }

        /* Column remaining cost */
        .column-remaining {
            font-size: 0.75rem;
            color: #e0a83c;
            margin-top: 3px;
        }
        .column-remaining.done { color: #4a9c3d; }

        /* Compact completed column badge (when Hide Completed is active) */
        .column-compact-done {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px 8px;
            background: linear-gradient(180deg, rgba(74,156,61,0.12) 0%, rgba(30,20,10,0.9) 100%);
            border: 2px solid rgba(74,156,61,0.4);
            cursor: pointer;
            transition: all 0.2s ease;
            gap: 8px;
            min-height: 120px;
        }
        .column-compact-done:hover {
            background: linear-gradient(180deg, rgba(74,156,61,0.25) 0%, rgba(30,20,10,0.9) 100%);
            border-color: #4a9c3d;
            transform: scale(1.03);
        }
        .column-compact-done img {
            width: 56px;
            height: 56px;
            object-fit: contain;
            filter: drop-shadow(0 0 6px rgba(74,156,61,0.6));
        }
        .column-compact-label {
            font-family: 'Cinzel', serif;
            font-size: 0.65rem;
            color: var(--gold-light);
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .column-compact-check { font-size: 1.1rem; }

        /* Mark All Column Button */
        .column-mark-all-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin-top: 12px;
            padding: 8px 20px;
            width: calc(100% - 30px);
            background: linear-gradient(180deg,
                rgba(212,175,55,0.22) 0%,
                rgba(120,80,10,0.40) 50%,
                rgba(80,50,5,0.50) 100%);
            border-top: 1px solid rgba(255,220,100,0.5);
            border-bottom: 1px solid rgba(100,60,0,0.7);
            border-left: 1px solid rgba(212,175,55,0.35);
            border-right: 1px solid rgba(212,175,55,0.35);
            border-radius: 4px;
            color: #f5d76e;
            font-family: 'Cinzel', serif;
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-transform: uppercase;
            text-shadow: 0 1px 3px rgba(0,0,0,0.6);
            box-shadow:
                0 2px 6px rgba(0,0,0,0.4),
                inset 0 1px 0 rgba(255,230,120,0.15),
                inset 0 -1px 0 rgba(0,0,0,0.2);
        }
        .column-mark-all-btn:hover {
            background: linear-gradient(180deg,
                rgba(255,215,60,0.35) 0%,
                rgba(180,120,20,0.55) 50%,
                rgba(120,75,10,0.65) 100%);
            border-top-color: rgba(255,235,130,0.7);
            color: #fff;
            box-shadow:
                0 4px 12px rgba(212,175,55,0.35),
                inset 0 1px 0 rgba(255,235,130,0.2);
            transform: translateY(-1px);
        }
        .column-mark-all-btn:active {
            transform: translateY(1px);
            box-shadow: 0 1px 3px rgba(0,0,0,0.4);
        }
        .column-mark-all-btn.all-done {
            background: linear-gradient(180deg,
                rgba(74,156,61,0.25) 0%,
                rgba(35,90,30,0.45) 50%,
                rgba(20,60,18,0.55) 100%);
            border-top-color: rgba(130,220,110,0.5);
            border-bottom-color: rgba(20,80,15,0.7);
            border-left-color: rgba(74,156,61,0.4);
            border-right-color: rgba(74,156,61,0.4);
            color: #90e080;
            text-shadow: 0 1px 3px rgba(0,0,0,0.5);
            box-shadow:
                0 2px 6px rgba(0,0,0,0.4),
                inset 0 1px 0 rgba(150,255,120,0.12),
                0 0 12px rgba(74,156,61,0.18);
        }
        .column-mark-all-btn.all-done:hover {
            background: linear-gradient(180deg,
                rgba(100,200,80,0.4) 0%,
                rgba(50,130,40,0.6) 50%,
                rgba(30,90,25,0.7) 100%);
            border-top-color: rgba(160,255,140,0.65);
            color: #fff;
            box-shadow:
                0 4px 14px rgba(74,156,61,0.35),
                inset 0 1px 0 rgba(180,255,160,0.18);
            transform: translateY(-1px);
        }

        /* Toast info */
        .stp-toast-info { background: rgba(100,160,220,0.95); border-color: #6ab0f5; color: #fff; }

        /* ── Compare Troops View ── */
        .compare-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            padding: 20px;
        }
        @media (max-width: 800px) { .compare-grid { grid-template-columns: 1fr; } }

        .compare-card {
            background: linear-gradient(180deg, rgba(45,31,15,0.95) 0%, rgba(30,20,10,0.98) 100%);
            border: 1px solid rgba(212,175,55,0.3);
            padding: 20px;
            text-align: center;
        }
        .compare-card-header {
            font-family: 'Cinzel', serif;
            font-size: 1.2rem;
            font-weight: 700;
            letter-spacing: 2px;
            border-bottom: 2px solid;
            padding-bottom: 12px;
            margin-bottom: 16px;
        }
        .compare-pct-ring {
            position: relative;
            width: 100px;
            height: 100px;
            margin: 0 auto 16px;
        }
        .compare-pct-ring svg { width: 100%; height: 100%; }
        .compare-pct-text {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Cinzel', serif;
            font-size: 1.3rem;
            font-weight: 700;
            color: #fff;
        }
        .compare-stats { margin-bottom: 16px; }
        .compare-stat {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px solid rgba(212,175,55,0.1);
            font-size: 0.85rem;
        }
        .compare-stat span { color: rgba(255,255,255,0.6); }
        .compare-stat strong { color: #d4af37; }
        .compare-columns-mini {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            justify-content: center;
            margin-top: 12px;
        }
        .compare-col-dot {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            color: rgba(0,0,0,0.7);
            cursor: default;
            transition: transform 0.2s;
        }
        .compare-col-dot:hover { transform: scale(1.2); }

        /* ============================================
           TOAST NOTIFICATION
           ============================================ */
        .stp-toast {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            background: #2d1f0f;
            color: #f4e4a6;
            border: 1px solid rgba(212, 175, 55, 0.4);
            border-radius: 8px;
            padding: 10px 20px;
            font-size: 0.85rem;
            font-family: 'Cinzel', serif;
            z-index: 9999;
            opacity: 0;
            transition: all 0.3s ease;
            white-space: nowrap;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }

        .stp-toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .stp-toast-success { border-color: rgba(74, 156, 61, 0.6); color: #6bc85a; }
        .stp-toast-warning { border-color: rgba(212, 175, 55, 0.6); color: #f4e4a6; }
        .stp-toast-error   { border-color: rgba(196, 69, 54, 0.6); color: #c44536; }

        /* ============================================
           LOCKED RESEARCH ITEM
           ============================================ */
        .column-research-item.locked-item {
            opacity: 0.5;
            cursor: not-allowed;
            position: relative;
            filter: grayscale(40%);
        }

        .column-research-item.locked-item:hover {
            opacity: 0.65;
            transform: none;
            box-shadow: none;
        }

        .locked-badge {
            position: absolute;
            top: 6px;
            right: 6px;
            font-size: 0.85rem;
            z-index: 2;
        }

        .research-locked-hint {
            font-size: 0.68rem;
            color: #c44536;
            margin-top: 2px;
            opacity: 0.9;
        }

        /* ============================================
           MOBILE IMPROVEMENTS
           ============================================ */
        @media (max-width: 600px) {
            .stp-save-panel {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
                padding: 10px 12px;
            }

            .stp-save-right {
                width: 100%;
                justify-content: space-between;
            }

            .stp-btn {
                flex: 1;
                justify-content: center;
                padding: 7px 6px;
                font-size: 0.7rem;
            }

            /* Columns em mobile: scroll horizontal com cards compactos */
            .columns-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                padding-bottom: 8px;
                scroll-snap-type: x mandatory;
            }

            .column-box {
                min-width: 260px;
                scroll-snap-align: start;
            }

            /* Stats cards: 2 colunas em mobile */
            .stats-cards {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 8px;
            }

            .stat-card {
                padding: 10px !important;
            }

            .stat-card-value {
                font-size: 1.4rem !important;
            }

            /* Modal nodes: 2 colunas em mobile pequeno */
            .nodes-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }

            .node-item {
                padding: 8px 6px !important;
            }

            .node-number {
                font-size: 0.7rem !important;
                width: 20px !important;
                height: 20px !important;
            }

            /* Milestones em 2 colunas */
            .skill-milestones-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }

            /* Bonus modal mais legível */
            .bonus-detail-modal {
                max-height: 85vh;
                overflow-y: auto;
                margin: 0 8px;
            }

            /* Troop buttons mais compactos */
            .troop-btn {
                padding: 10px 6px !important;
                font-size: 0.7rem !important;
            }

            .troop-btn-icon {
                width: 32px !important;
                height: 32px !important;
            }
        }
