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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    color: #e8e8e8;
    min-height: 100vh;
    overflow-x: auto;
}

.container {
    display: flex;
    min-height: 100vh;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

/* Left Sidebar */
.left-sidebar {
    width: 380px;
    background: rgba(30, 30, 50, 0.9);
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
}
/* Fellowship Logo */
.fellowship-logo-container {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3);
}

.fellowship-logo-link {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.fellowship-logo-link:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.fellowship-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #b8860b;
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.4);
}

.hero-selector {
    margin-bottom: 30px;
}

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

.hero-card {
    background: rgba(30, 30, 50, 0.9);
    border: 2px solid #555;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hero-card:hover {
    border-color: #b8860b;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
    transform: translateY(-2px);
}

.hero-card.active {
    border-color: #b8860b;
    background: rgba(184, 134, 11, 0.1);
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.4);
}

.hero-card.hero-hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.hero-name {
    font-size: 18px;
    font-weight: bold;
    color: #e8e8e8;
    margin-bottom: 5px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #b8860b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Hero Button Container */
.hero-btn-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.hero-btn {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
    border: 2px solid #444;
    color: #e8e8e8;
    padding: 8px 4px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: bold;
}

.hero-btn:hover {
    border-color: #b8860b;
    background: linear-gradient(135deg, #3a3a5a 0%, #2a2a4a 100%);
}

.hero-btn.active {
    border-color: #ffd700;
    background: linear-gradient(135deg, #b8860b 0%, #996f00 100%);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.hero-btn {
    cursor: pointer;
    opacity: 1;
}

.hero-btn:hover {
    border-color: #b8860b;
    background: linear-gradient(135deg, #3a3a5a 0%, #2a2a4a 100%);
}

.hero-btn[data-hero="Meiko"],
.hero-btn[data-hero="Sylvie"],
.hero-btn[data-hero="Vigour"] {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Coming Soon Note */
.coming-soon-note {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    color: #b8860b;
    font-style: italic;
    font-size: 14px;
    border-top: 1px solid #444;
    padding-top: 15px;
}


.stats-section {
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.section-title {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #b8860b;
    padding-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* Stats tab styling */
#stats-tab .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    overflow: visible;
}

#stats-tab .stat-input {
    background: rgba(30, 30, 50, 0.9);
    border: 1px solid #b8860b;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
    word-wrap: break-word;
}

#stats-tab .stat-input:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

#stats-tab .stat-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #e8e8e8;
    font-size: 13px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

#stats-tab .stat-input input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid #555;
    border-radius: 4px;
    color: #e8e8e8;
    font-size: 14px;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#stats-tab .stat-input input:focus {
    border-color: #b8860b;
    outline: none;
    box-shadow: 0 0 5px rgba(184, 134, 11, 0.5);
}

.stat-input {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-input label {
    color: #ccc;
    font-size: 12px;
    margin-right: 8px;
    flex-shrink: 0;
    min-width: 80px;
}

.stat-input input {
    background: rgba(40, 40, 60, 0.8);
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    padding: 4px 6px;
    font-size: 12px;
    width: 60px;
    flex-shrink: 0;
}

.stat-input input:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 5px rgba(184, 134, 11, 0.3);
}

/* Stat Tooltips */
.stat-input {
    position: relative;
}

.stat-input label {
    cursor: help;
    position: relative;
}

.stat-tooltip {
    position: absolute;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid #b8860b;
    border-radius: 5px;
    padding: 10px;
    color: #e8e8e8;
    font-size: 12px;
    width: 250px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.stat-input label:hover .stat-tooltip {
    opacity: 1;
    visibility: visible;
}

.stat-icon {
    margin-right: 5px;
    font-size: 14px;
}

/* Center Area */
.center-area {
    flex: 1;
    background: rgba(30, 30, 50, 0.9);
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 20px;
    max-width: 1050px;
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
    overflow: visible;
    min-height: 100vh;
}

/* Tab System */
.tab-container {
    margin-bottom: 20px;
}

.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #444;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-nav::-webkit-scrollbar {
    height: 4px;
}

.tab-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.tab-nav::-webkit-scrollbar-thumb {
    background: #b8860b;
    border-radius: 2px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #b8860b;
}

.tab-btn.active {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

.tab-content {
    display: none;
    overflow: visible;
}

.tab-content.active {
    display: block;
    overflow: visible;
}

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

.talent-points {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    color: #ffd700;
}

.talent-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.control-btn {
    background: linear-gradient(135deg, #b8860b 0%, #996f00 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.control-btn:hover {
    background: linear-gradient(135deg, #d4a517 0%, #b8860b 100%);
}

.toggle-all-btn {
    padding: 8px 16px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.toggle-all-btn:hover {
    background: #b71c1c;
}

.talents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.talent {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.talent:hover {
    border-color: #b8860b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.4);
}

.talent.selected {
    border-color: #ffd700;
    background: linear-gradient(135deg, #4a4a2a 0%, #3a3a1a 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.talent.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

.talent-icon {
    width: 40px;
    height: 40px;
    background: #555;
    border-radius: 6px;
    margin: 0 auto 8px;
    border: 1px solid #777;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Talent icon images from Images folder */
.red-ledger-icon { background-image: url('Images/red-ledger-icon.jpg'); }
.corrosive-spill-icon { background-image: url('Images/corrosive-spill-icon.jpg'); }
.assassins-guile-icon { background-image: url('Images/assassins-guile-icon.jpg'); }
.bloodrush-icon { background-image: url('Images/bloodrush-icon.jpg'); }
.venomous-delight-icon { background-image: url('Images/venomous-delight-icon.jpg'); }
.efficient-killer-icon { background-image: url('Images/efficient-killer-icon.jpg'); }
.gushing-blood-icon { background-image: url('Images/gushing-blood-icon.jpg'); }
.feed-the-queen-icon { background-image: url('Images/feed-the-queen-icon.jpg'); }
.deadly-scheme-icon { background-image: url('Images/deadly-scheme-icon.jpg'); }
.veil-of-shadows-icon { background-image: url('Images/veil-of-shadows-icon.jpg'); }
.maidens-doom-icon { background-image: url('Images/maidens-doom-icon.jpg'); }
.magic-ward-icon { background-image: url('Images/magic-ward-icon.jpg'); }
.from-the-shadows-icon { background-image: url('Images/from-the-shadows-icon.jpg'); }
.hemotoxin-icon { background-image: url('Images/hemotoxin-icon.jpg'); }
.malevolence-icon { background-image: url('Images/malevolence-icon.jpg'); }
.arachnid-onslaught-icon { background-image: url('Images/arachnid-onslaught-icon.jpg'); }
.spirited-fortitude-icon { background-image: url('Images/spirited-fortitude-icon.jpg'); }
.puncture-icon { background-image: url('Images/puncture-icon.jpg'); }

.talent-name {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    text-align: center;
}

.talent-cost {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #b8860b;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

.gear-section {
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
}

.gear-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.gear-slot {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
    border: 2px solid #444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gear-slot:hover {
    border-color: #b8860b;
}

.gear-slot-label {
    color: #999;
    font-size: 10px;
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
}

/* Footer Section */
.footer-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: #b8860b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #d4af37;
    text-decoration: underline;
}

.contact-btn {
    background: linear-gradient(135deg, #b8860b, #d4af37);
    color: #1e1e32;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.4);
}

.footer-copyright {
    color: #888;
    font-size: 12px;
    margin-top: 10px;
}

.footer-copyright p {
    margin: 0;
}

/* Right Sidebar */
.right-sidebar {
    width: 380px;
    background: rgba(30, 30, 50, 0.9);
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
}

.simulation-section {
    margin-bottom: 20px;
}


.results-section {
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    min-height: 200px;
}

.results-placeholder {
    color: #888;
    text-align: center;
    margin-top: 50px;
}

/* Abilities Section */
.abilities-section {
    margin-bottom: 30px;
}

.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.ability {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.ability:hover {
    border-color: #b8860b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.4);
}

.ability-icon {
    width: 50px;
    height: 50px;
    background: #555;
    border-radius: 8px;
    margin: 0 auto 10px;
    border: 1px solid #777;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.ability-name {
    color: #ffd700;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

.ability-description {
    color: #ccc;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.ability-stats {
    color: #b8860b;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 8px;
}

.ability-scaling, .ability-effects, .ability-damage {
    margin-top: 8px;
    font-size: 11px;
}

.ability-scaling strong, .ability-effects strong, .ability-damage strong {
    color: #ffd700;
    font-size: 12px;
}

.ability-scaling ul, .ability-effects ul, .ability-damage ul {
    margin: 4px 0 0 15px;
    padding: 0;
}

.ability-scaling li, .ability-effects li, .ability-damage li {
    color: #ccc;
    margin-bottom: 2px;
    line-height: 1.3;
}

.ability-damage strong {
    color: #ff6b6b; /* Red color for damage values */
}

/* Rotation Section */
.rotation-section {
    margin-bottom: 30px;
}

/* Rotation Method Tabs */
.rotation-method-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #555;
}

.method-tab {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.method-tab.active {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

.method-tab:hover {
    color: #fff;
}

.rotation-method-content {
    display: none;
}

.rotation-method-content.active {
    display: block;
}

/* Positional Settings */

.setting-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.setting-input label {
    color: #ccc;
    font-size: 12px;
    margin-right: 10px;
    min-width: 200px;
}

.setting-input input {
    background: rgba(60, 60, 80, 0.8);
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    width: 80px;
    margin-right: 10px;
}

.setting-description {
    color: #999;
    font-size: 11px;
    font-style: italic;
}

/* Priority List */
.priority-list {
    background: rgba(40, 40, 60, 0.8);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.priority-list h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 14px;
}

.priority-instructions {
    margin-bottom: 15px;
}

.priority-instructions p {
    color: #ccc;
    font-size: 12px;
    margin: 0;
}

.priority-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.priority-item {
    background: rgba(60, 60, 80, 0.8);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none; /* Prevent text selection during drag */
}

.priority-item:hover {
    background: rgba(80, 80, 100, 0.8);
    border-color: #777;
}

.priority-item.dragging {
    opacity: 0.5;
}

.priority-item.drag-over {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.priority-number {
    background: #ffd700;
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.priority-ability-icon {
    width: 32px;
    height: 32px;
    background: #555;
    border-radius: 4px;
    margin-right: 10px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.priority-ability-name {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    flex-grow: 1;
}

.priority-ability-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.priority-ability-condition {
    color: #e8e8e8;
    font-size: 10px;
    font-style: italic;
    margin-top: 2px;
}

.priority-ability-cost {
    color: #e8e8e8;
    font-size: 11px;
    margin-left: 10px;
}

.priority-ability-checkbox {
    margin-right: 10px;
    flex-shrink: 0;
}

.priority-ability-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ffd700;
}

.priority-item.disabled {
    opacity: 0.5;
    background: rgba(40, 40, 60, 0.8);
}

.priority-item.disabled .priority-ability-name {
    color: #888;
}

.priority-item.disabled .priority-ability-condition {
    color: #666;
}

.priority-item.disabled .priority-ability-cost {
    color: #666;
}

/* Sequence Builder */
.sequence-builder {
    background: rgba(40, 40, 60, 0.8);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.sequence-builder h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 14px;
}

.sequence-instructions {
    margin-bottom: 15px;
}

.sequence-instructions p {
    color: #ccc;
    font-size: 12px;
    margin: 0;
}

.sequence-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.sequence-item {
    background: rgba(60, 60, 80, 0.8);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
}

.sequence-number {
    background: #666;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
}

.sequence-ability-icon {
    width: 32px;
    height: 32px;
    background: #555;
    border-radius: 4px;
    margin-right: 10px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.sequence-ability-name {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    flex-grow: 1;
}

.sequence-remove {
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}

.sequence-controls {
    text-align: center;
}

.add-sequence-btn {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-sequence-btn:hover {
    background: #45a049;
}

/* DPS Results */
.dps-results {
    background: rgba(40, 40, 60, 0.8);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.dps-results h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 16px;
}

.dps-output {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dps-stat {
    background: rgba(60, 60, 80, 0.8);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.dps-label {
    color: #ccc;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}

.dps-value {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
}

.dps-breakdown {
    margin-bottom: 20px;
}

.dps-breakdown h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 14px;
}

.breakdown-list {
    background: rgba(60, 60, 80, 0.8);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    overflow: hidden; /* Ensure content doesn't spill out */
}

.sequence-list {
    background: rgba(60, 60, 80, 0.8);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sequence-list::-webkit-scrollbar {
    width: 8px;
}

.sequence-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sequence-list::-webkit-scrollbar-thumb {
    background: #b8860b;
    border-radius: 4px;
}

.sequence-list::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}

.detailed-log {
    margin-top: 20px;
}

.detailed-log h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 16px;
}

.log-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.toggle-log-btn {
    background: linear-gradient(135deg, #4a4a2a 0%, #3a3a1a 100%);
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-log-btn:hover {
    background: linear-gradient(135deg, #5a5a3a 0%, #4a4a2a 100%);
}

.log-info {
    color: #aaa;
    font-size: 11px;
    font-style: italic;
}

.log-list {
    background: rgba(40, 40, 60, 0.9);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    -webkit-overflow-scrolling: touch;
}

.log-list::-webkit-scrollbar {
    width: 8px;
}

.log-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.log-list::-webkit-scrollbar-thumb {
    background: #b8860b;
    border-radius: 4px;
}

.log-list::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2px 0;
    border-bottom: 1px solid #333;
    line-height: 1.3;
}

.log-item:last-child {
    border-bottom: none;
}

.log-timestamp {
    color: #ffd700;
    min-width: 60px;
    font-weight: bold;
}

.log-event {
    color: #fff;
    flex: 1;
    margin-left: 10px;
}

.log-damage {
    color: #ff6b6b;
}

.log-energy {
    color: #4ecdc4;
}

.log-charge {
    color: #ffd93d;
}

.log-ability {
    color: #ff6b6b; /* Red for regular damage */
}

.log-crit {
    color: #e50101; /* Dark red for critical strikes */
    font-weight: bold;
}

.log-miss {
    color: #ff8c00; /* Orange for misses */
}

.log-info {
    color: #ffd700; /* Yellow for info messages (auto attack, swing timer, etc) */
}

.log-cooldown {
    color: #ffa8a8;
}

.log-resource {
    color: #4ecdc4; /* Cyan for resource messages (Fury, Spirit, etc) */
}

.log-talent {
    color: #bc6fe1; /* Purple for talent procs and effects */
}

.log-effect {
    color: #ffd93d; /* Yellow for buffs/debuffs */
}

.log-aura {
    color: #bc6fe1; /* Purple for aura applications */
}

.log-channel {
    color: #76e1d6; /* Teal for channel messages */
}

.sequence-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid #444;
    font-size: 12px;
}

.sequence-item:last-child {
    border-bottom: none;
}

.sequence-time {
    color: #ffd700;
    font-weight: bold;
    min-width: 60px;
}

.sequence-ability {
    color: #fff;
    flex-grow: 1;
    margin-left: 10px;
}

.sequence-damage {
    color: #ff6b6b;
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #444;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-ability {
    color: #fff;
    font-size: 12px;
}

.breakdown-stats {
    color: #ffd700;
    font-size: 11px;
}

.simulation-settings {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(40, 40, 60, 0.8);
    border-radius: 8px;
    border: 1px solid #555;
}

.simulation-settings h4 {
    margin: 0 0 15px 0;
    color: #ffd700;
    font-size: 16px;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-group label {
    font-weight: 500;
    color: #ccc;
    min-width: 80px;
}

.setting-group select,
.setting-group input {
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #2a2a4a;
    color: #fff;
    font-size: 14px;
    min-width: 120px;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: #ffd700;
}

.setting-group input[type="number"] {
    width: 80px;
    min-width: 80px;
}

.simulation-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.button-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-row button {
    flex: 1;
    min-width: 100px;
}

.settings-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.simulation-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar stacks vertically */
.right-sidebar .simulation-controls {
    gap: 10px;
}

.right-sidebar .button-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.right-sidebar .button-row button {
    flex: 1;
}

.right-sidebar .button-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.right-sidebar .button-column button {
    width: 100%;
}

.right-sidebar .simulation-inputs {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.right-sidebar .simulation-inputs label {
    font-size: 0.9em;
}

.right-sidebar .simulation-inputs select,
.right-sidebar .simulation-inputs input {
    width: 100%;
}

.iteration-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.iteration-select {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    min-width: 140px;
}

.iteration-select:focus {
    outline: none;
    border-color: #4CAF50;
}

.export-import-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.export-btn, .import-btn {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
    border: 2px solid #444;
    color: #e8e8e8;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    flex: 1;
}

.export-btn:hover {
    border-color: #28a745;
    background: linear-gradient(135deg, #3a5a3a 0%, #2a4a2a 100%);
}

.import-btn:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #3a4a5a 0%, #2a3a4a 100%);
}

.run-sim-btn, .stop-sim-btn {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.run-sim-btn:hover {
    background: #45a049;
}

.stop-sim-btn {
    background: #ff4444;
}

.stop-sim-btn:hover {
    background: #cc3333;
}

.simulation-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ffd700;
    padding: 20px 40px;
    border-radius: 10px;
    border: 2px solid #ffd700;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000;
    display: none;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes pulse {
    0% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% { 
        opacity: 0.7; 
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
}

.simulation-timer {
    font-size: 14px;
    color: #4ecdc4;
    margin-top: 10px;
}

.simulation-progress {
    margin-top: 15px;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    font-size: 12px;
    color: #4ecdc4;
    text-align: center;
    font-weight: bold;
}

.rotation-placeholder {
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #888;
}

.rotation-placeholder p {
    margin-bottom: 10px;
}

/* Info Tab Styles */
.info-section {
    padding: 20px;
}

.info-subsection {
    margin-bottom: 30px;
    background: rgba(40, 40, 60, 0.6);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #555;
}

.info-subsection h3 {
    color: #ffd700;
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 8px;
}

.info-subsection h4 {
    color: #a8e6cf;
    margin: 15px 0 8px 0;
    font-size: 14px;
}

.info-content ul {
    margin: 0;
    padding-left: 20px;
}

.info-content li {
    color: #ccc;
    margin-bottom: 6px;
    line-height: 1.4;
}

.info-content strong {
    color: #fff;
}

/* Talent Tooltip Styles */
.talent-tooltip {
    position: absolute;
    background: rgba(20, 20, 30, 0.95);
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 12px;
    max-width: 300px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-size: 12px;
    line-height: 1.4;
}

.talent-tooltip-header {
    background: linear-gradient(135deg, #8b7355 0%, #6b5b47 100%);
    color: #2a2a2a;
    font-weight: bold;
    padding: 6px 10px;
    margin: -12px -12px 8px -12px;
    border-radius: 6px 6px 0 0;
    text-align: center;
    font-size: 13px;
}

.talent-tooltip-body {
    color: #ccc;
}

.talent-tooltip strong {
    color: #ffd700;
}

.talent-tooltip .ability-name {
    color: #ff6b6b;
}

.talent-tooltip .energy-text {
    color: #4ecdc4;
}

.talent-tooltip .damage-text {
    color: #ff6b6b;
}

.talent-tooltip .haste-text {
    color: #ffd93d;
}

/* Mobile Tooltip Styles */
@media (max-width: 768px) {
    .talent-tooltip {
        position: fixed !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
        max-width: calc(100vw - 40px);
        width: auto;
        margin: 0;
    }
}

/* Ability Table Styles */
.ability-table {
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.ability-table-header {
    display: grid;
    grid-template-columns: 60px 150px 200px 80px 80px 80px 80px 80px;
    background: rgba(40, 40, 60, 0.9);
    border-bottom: 1px solid #555;
    padding: 12px 8px;
    font-weight: bold;
    font-size: 0.9em;
    color: #e8e8e8;
}

.ability-table-row {
    display: grid;
    grid-template-columns: 60px 150px 200px 80px 80px 80px 80px 80px;
    border-bottom: 1px solid rgba(68, 68, 68, 0.3);
    padding: 10px 8px;
    font-size: 0.85em;
    align-items: center;
    transition: background-color 0.2s ease;
}

.ability-table-row:hover {
    background: rgba(60, 60, 80, 0.3);
}

.ability-table-total {
    background: rgba(50, 50, 70, 0.5);
    font-weight: bold;
    border-top: 2px solid #b8860b;
}

.ability-col-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ability-col-name {
    display: flex;
    align-items: center;
    color: #e8e8e8;
    font-weight: 500;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ability-col-amount {
    padding: 0 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
    box-sizing: border-box;
}

.ability-col-casts,
.ability-col-hits,
.ability-col-avg-hit,
.ability-col-crit,
.ability-col-dps {
    padding: 0 6px;
    text-align: center;
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
    box-sizing: border-box;
}


.ability-icon {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 4px;
}

.ability-col-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.amount-header-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.amount-header-percentage {
    min-width: 50px;
    text-align: left;
    font-size: 0.8em;
    color: #4ecdc4;
}

.amount-header-bar {
    flex: 1;
    text-align: center;
    font-size: 0.8em;
    color: #e8e8e8;
}

.amount-header-damage {
    min-width: 60px;
    text-align: right;
    font-size: 0.8em;
    color: #ff6b6b;
}

.ability-percentage {
    min-width: 50px;
    color: #4ecdc4;
    font-weight: bold;
}

.ability-bar-container {
    flex: 1;
    height: 16px;
    background: rgba(68, 68, 68, 0.5);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.ability-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #45b7aa 100%);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.ability-damage {
    min-width: 60px;
    text-align: right;
    color: #ff6b6b;
    font-weight: bold;
}

.ability-col-casts,
.ability-col-hits,
.ability-col-avg-hit,
.ability-col-crit,
.ability-col-dps {
    text-align: center;
    color: #e8e8e8;
}

.ability-col-dps {
    color: #ffd93d;
    font-weight: bold;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: #b8860b;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .ability-table-header,
    .ability-table-row {
        grid-template-columns: 50px 130px 180px 70px 70px 70px 70px 70px;
        font-size: 0.8em;
    }
}

@media (max-width: 900px) {
    .ability-table-header,
    .ability-table-row {
        grid-template-columns: 40px 120px 160px 60px 60px 60px 60px 60px;
        font-size: 0.75em;
        padding: 8px 4px;
    }
    
    .ability-icon {
        width: 24px;
        height: 24px;
    }
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }

    .left-sidebar {
        width: 100%;
        max-width: none;
        order: 1; /* Show first on mobile */
        display: block; /* Show by default on mobile */
    }

    .left-sidebar.mobile-open {
        display: block;
    }

    .mobile-menu-toggle {
        display: none; /* Hide mobile menu toggle since sidebar is always visible */
    }

    /* Main content area adjustments */
    .main-content {
        width: 100%;
        order: 2; /* Show second on mobile */
    }

    .right-sidebar {
        display: none; /* Hide right sidebar on mobile */
    }

    /* Tab navigation improvements - horizontal scroll */
    .tab-nav {
        justify-content: flex-start;
        padding: 0 10px;
        gap: 8px;
        scroll-behavior: smooth;
        border-bottom: none;
    }

    .tab-btn {
        flex: 0 0 auto;
        min-width: 90px;
        font-size: 13px;
        padding: 12px 16px;
        white-space: nowrap;
        background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
        border: 2px solid #444;
        border-radius: 8px;
        color: #e8e8e8;
        border-bottom: 2px solid #444;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .tab-btn:hover {
        background: linear-gradient(135deg, #3a3a5a 0%, #2a2a4a 100%);
        border-color: #b8860b;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    }

    .tab-btn.active {
        background: linear-gradient(135deg, #b8860b 0%, #996f00 100%);
        border-color: #ffd700;
        color: #fff;
        border-bottom: 2px solid #ffd700;
        box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
        transform: translateY(-1px);
    }

    /* Hero cards mobile */
    .hero-buttons {
        gap: 10px;
    }

    .hero-card {
        padding: 12px;
        gap: 8px;
    }

    .hero-name {
        font-size: 16px;
    }

    .hero-icon {
        width: 60px;
        height: 60px;
    }

    /* Hero buttons mobile */
    .hero-btn-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .hero-btn {
        padding: 10px 6px;
        font-size: 11px;
    }

    /* Stats grid improvements */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Stats tab specific improvements */
    #stats-tab .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
        overflow: visible;
    }

    #stats-tab .stat-input {
        background: rgba(30, 30, 50, 0.9);
        border: 1px solid #b8860b;
        border-radius: 8px;
        padding: 12px;
        min-height: 80px;
        overflow: visible;
    }

    #stats-tab .stat-input label {
        font-size: 12px;
        line-height: 1.2;
        margin-bottom: 6px;
    }

    #stats-tab .stat-input input {
        font-size: 13px;
        padding: 6px 8px;
    }

    .stat-item {
        padding: 10px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 16px;
    }

    /* Simulation controls */
    .simulation-controls {
        flex-direction: column;
        gap: 10px;
    }

    .simulation-controls > div {
        width: 100%;
    }

    .simulation-controls input,
    .simulation-controls select,
    .simulation-controls button {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Talent grid improvements */
    .talent-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .talent-item {
        padding: 8px;
    }

    .talent-icon {
        width: 32px;
        height: 32px;
    }

    .talent-name {
        font-size: 12px;
    }

    /* Ability grid improvements */
    .abilities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ability-item {
        padding: 8px;
    }

    .ability-icon {
        width: 32px;
        height: 32px;
    }

    .ability-name {
        font-size: 12px;
    }

    /* Priority/Sequence lists */
    .priority-list,
    .sequence-list {
        padding: 10px;
    }

    .priority-item,
    .sequence-item {
        padding: 8px;
        margin-bottom: 8px;
    }

    .priority-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .priority-ability-icon,
    .sequence-ability-icon {
        width: 28px;
        height: 28px;
    }

    .priority-ability-name,
    .sequence-ability-name {
        font-size: 12px;
    }

    /* Info sections */
    .info-section {
        padding: 15px;
    }

    .info-subsection {
        margin-bottom: 20px;
    }

    .info-content {
        font-size: 14px;
        line-height: 1.4;
    }

    .info-content h4 {
        font-size: 16px;
        margin: 10px 0 5px 0;
    }

    .info-content ul {
        padding-left: 20px;
    }

    .info-content li {
        margin-bottom: 5px;
    }

    /* Tables - make them horizontally scrollable */
    .ability-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px; /* Extend to edges */
        padding: 0 10px;
    }

    .ability-table-container::-webkit-scrollbar {
        height: 6px;
    }

    .ability-table-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }

    .ability-table-container::-webkit-scrollbar-thumb {
        background: #b8860b;
        border-radius: 3px;
    }

    .ability-table {
        width: fit-content; /* Table width matches content exactly */
        min-width: 500px; /* Minimum width to prevent compression */
    }

    .ability-table-header,
    .ability-table-row {
        grid-template-columns: 40px 140px 80px 80px 80px 80px 80px;
        font-size: 12px;
        padding: 6px 4px;
    }

    /* Gear grid */
    .gear-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gear-slot {
        padding: 10px;
    }

    .gear-slot-icon {
        width: 40px;
        height: 40px;
    }

    /* Rotation method tabs */
    .rotation-method-tabs {
        flex-direction: column;
        gap: 5px;
    }

    .method-tab {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    /* Button improvements for touch */
    button {
        min-height: 44px; /* iOS recommended touch target */
        padding: 12px 16px;
    }

    /* Form elements */
    input, select, textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Footer Mobile Styles */
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .footer-link, .contact-btn {
        font-size: 16px;
        padding: 12px 20px;
    }

    .footer-copyright {
        font-size: 14px;
    }

    /* Log list mobile improvements */
    .log-list {
        max-height: 300px;
        font-size: 12px;
        padding: 8px;
    }

    .log-item {
        padding: 6px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .log-event {
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .log-details {
        font-size: 10px;
        opacity: 0.8;
    }

    /* Breakdown and sequence lists mobile improvements */
    .breakdown-list {
        padding: 8px;
        overflow: hidden;
    }

    .sequence-list {
        max-height: 250px;
        font-size: 12px;
        padding: 8px;
    }

    /* Section titles */
    .section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    /* Results display */
    .simulation-results {
        padding: 15px;
    }

    .results-summary {
        flex-direction: column;
        gap: 10px;
    }

    .result-item {
        padding: 10px;
        text-align: center;
    }

    .result-value {
        font-size: 20px;
    }

    .result-label {
        font-size: 12px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .tab-btn {
        min-width: 80px;
        font-size: 11px;
        padding: 10px 12px;
        border-radius: 6px;
    }

    .hero-buttons {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    #stats-tab .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
        overflow: visible;
    }

    #stats-tab .stat-input {
        padding: 10px;
        min-height: 70px;
        overflow: visible;
    }

    #stats-tab .stat-input label {
        font-size: 11px;
        line-height: 1.1;
        margin-bottom: 4px;
    }

    #stats-tab .stat-input input {
        font-size: 12px;
        padding: 5px 6px;
    }

    .talent-grid,
    .abilities-grid {
        grid-template-columns: 1fr;
    }

    .gear-grid {
        grid-template-columns: 1fr;
    }

    .ability-table {
        width: fit-content;
        min-width: 450px;
    }

    .ability-table-header,
    .ability-table-row {
        grid-template-columns: 35px 120px 60px 60px 60px 60px 60px;
        font-size: 10px;
        padding: 4px 2px;
    }

    /* Log list mobile improvements */
    .log-list {
        max-height: 250px;
        font-size: 10px;
        padding: 6px;
    }

    .log-item {
        padding: 4px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .log-event {
        margin-bottom: 2px;
        line-height: 1.2;
    }

    .log-details {
        font-size: 9px;
        opacity: 0.8;
    }

    /* Breakdown and sequence lists small mobile improvements */
    .breakdown-list {
        padding: 6px;
    }

    .sequence-list {
        max-height: 200px;
        font-size: 10px;
        padding: 6px;
    }
}

/* Color classes for ability descriptions */
/* Rime */
.ability-ref    { color: #d4af66; }
.damage         { color: #cf8a1c; }
.energy         { color: #56a3de; }
.healing        { color: #64f8c9; }
.gcd            { color: #76e1d6; }
.spirit-ability { color: #bc6fe1; }
.talent-ref     { color: #bc6fe1; }
.highlight      { color: #ffffff; }

/* Jeweler Interactive Overlay - Grid Layout */
.jeweler-interactive-overlay {
    display: grid;
    grid-template-columns: 0px repeat(6, 42px);
    grid-template-rows: repeat(10, 42px) 24px;
    column-gap: clamp(0px, 4vw, 50px);
    row-gap: clamp(1px, 1.5vw, 10px);
    justify-content: center;
    align-content: center;
    min-height: 600px;
    padding: 40px 20px;
    border: 2px solid #b8860b;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
}

/* Power labels (left column) - use nth-child to position */
.gem-power-label {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    font-weight: bold;
    font-size: 13px;
}

.gem-power-label:nth-child(1) { grid-column: 1; grid-row: 1; }
.gem-power-label:nth-child(2) { grid-column: 1; grid-row: 2; }
.gem-power-label:nth-child(3) { grid-column: 1; grid-row: 3; }
.gem-power-label:nth-child(4) { grid-column: 1; grid-row: 4; }
.gem-power-label:nth-child(5) { grid-column: 1; grid-row: 5; }
.gem-power-label:nth-child(6) { grid-column: 1; grid-row: 6; }
.gem-power-label:nth-child(7) { grid-column: 1; grid-row: 7; }
.gem-power-label:nth-child(8) { grid-column: 1; grid-row: 8; }
.gem-power-label:nth-child(9) { grid-column: 1; grid-row: 9; }
.gem-power-label:nth-child(10) { grid-column: 1; grid-row: 10; }

/* Footer spacer (bottom left corner) */
.gem-footer-spacer {
    grid-column: 1;
    grid-row: 11;
}

/* Total power labels (bottom row) */
.gem-total-power {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    font-weight: bold;
    font-size: 14px;
    background: rgba(184, 134, 11, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(184, 134, 11, 0.4);
    grid-row: 11;
}

.gem-total-power[data-column="0"] { grid-column: 2; }
.gem-total-power[data-column="1"] { grid-column: 3; }
.gem-total-power[data-column="2"] { grid-column: 4; }
.gem-total-power[data-column="3"] { grid-column: 5; }
.gem-total-power[data-column="4"] { grid-column: 6; }
.gem-total-power[data-column="5"] { grid-column: 7; }

/* Jeweler Gem Slot Styles */
.jeweler-gem-slot {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent !important;
}

/* Position gem slots based on column (2-7) and row (1-10) */
.jeweler-gem-slot[data-column="0"] { grid-column: 2; }
.jeweler-gem-slot[data-column="1"] { grid-column: 3; }
.jeweler-gem-slot[data-column="2"] { grid-column: 4; }
.jeweler-gem-slot[data-column="3"] { grid-column: 5; }
.jeweler-gem-slot[data-column="4"] { grid-column: 6; }
.jeweler-gem-slot[data-column="5"] { grid-column: 7; }

.jeweler-gem-slot[data-index="0"] { grid-row: 1; }
.jeweler-gem-slot[data-index="1"] { grid-row: 2; }
.jeweler-gem-slot[data-index="2"] { grid-row: 3; }
.jeweler-gem-slot[data-index="3"] { grid-row: 4; }
.jeweler-gem-slot[data-index="4"] { grid-row: 5; }
.jeweler-gem-slot[data-index="5"] { grid-row: 6; }
.jeweler-gem-slot[data-index="6"] { grid-row: 7; }
.jeweler-gem-slot[data-index="7"] { grid-row: 8; }
.jeweler-gem-slot[data-index="8"] { grid-row: 9; }
.jeweler-gem-slot[data-index="9"] { grid-row: 10; }

.jeweler-gem-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--gem-image);
    background-size: var(--gem-size);
    background-position: var(--gem-position);
    background-repeat: var(--gem-repeat);
    border-radius: inherit;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.jeweler-gem-slot:hover {
    border-color: rgba(184, 134, 11, 0.4) !important;
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.3) !important;
    z-index: 10001;
}

.jeweler-gem-slot:hover::before {
    opacity: 1;
}

.jeweler-gem-slot.active {
    border-color: #d4af37 !important;
    box-shadow: 
        0 0 10px rgba(212, 175, 55, 0.8),
        0 0 18px rgba(212, 175, 55, 0.6),
        0 0 25px rgba(212, 175, 55, 0.4) !important;
}

.jeweler-gem-slot.active::before {
    opacity: 1;
}

/* Gem Tooltip Styles */
.gem-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(20, 20, 35);
    border: 2px solid #b8860b;
    border-radius: 8px;
    padding: 12px;
    min-width: 250px;
    max-width: 300px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.jeweler-gem-slot:hover .gem-tooltip {
    opacity: 1;
    visibility: visible;
}

.gem-tooltip-name {
    color: #ffd700;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
    text-align: center;
    text-transform: uppercase;
}

.gem-tooltip-type {
    color: #b8860b;
    font-size: 11px;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 500;
}

.gem-tooltip-description {
    color: #e8e8e8;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    white-space: pre-line;
}

/* Gem Reference Table Styles */
.gem-reference-table-container {
    margin-top: 20px;
    width: 100%;
    overflow-x: auto;
}

.gem-reference-table {
    width: 100%;
    min-width: 800px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
}

.gem-reference-table th {
    background: rgba(184, 134, 11, 0.3);
    color: #ffd700;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(184, 134, 11, 0.5);
    font-weight: bold;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gem-reference-table td {
    border: 1px solid rgba(184, 134, 11, 0.3);
    padding: 10px;
    vertical-align: top;
}

.gem-power-cell {
    background: rgba(184, 134, 11, 0.2);
    color: #ffd700;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
    width: 80px;
}

.gem-info-cell {
    background: rgba(20, 20, 35, 0.6);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gem-table-description {
    color: #e8e8e8;
    font-size: 11px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-line;
}

.jeweler-gem-header::after,
.jeweler-gem-footer-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: inherit;
    filter: brightness(1.2);
}

.jeweler-gem-footer-icon::after {
    width: 38px;
    height: 38px;
}

/* Equipment Selection Styles */
.weapon-selection-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .weapon-selection-container {
        grid-template-columns: 1fr;
    }
}

/* Ad visibility for mobile vs desktop */
.ad-left-rail-1 {
    display: block;
}

.ad-left-rail-2 {
    display: none;
}

@media (min-width: 769px) {
    .ad-left-rail-1 {
        display: none;
    }
    
    .ad-left-rail-2 {
        display: block;
    }
}

.equipment-section h2 {
    color: #d4af37;
    font-size: 28px;
    margin-bottom: 20px;
}

.weapon-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    width: 100%;
}

.weapon-card:hover {
    border-color: rgba(184, 134, 11, 0.6);
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.3);
}

.weapon-card.selected {
    border-color: #d4af37;
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.6),
        0 0 30px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
}

.weapon-name {
    font-size: 18px;
    font-weight: bold;
    color: #d4af37;
    margin-bottom: 10px;
}

.weapon-effect-name {
    font-size: 14px;
    color: #b8a082;
    margin-bottom: 8px;
    font-weight: 600;
}

.weapon-description {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}