/**
 * Mythic+ Keystone Calculator CSS
 * Eternal Illusion - Keystone Kalkulátor stílusok
 * 2025. október 28.
 */

/* === MAIN CONTAINER === */
.keystone-calculator-container {
    max-height: none;
    padding: 20px;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* === INPUT SECTION === */
.calculator-input-section {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    font-weight: 600;
    color: #ffd700;
    min-width: 140px;
    font-size: 14px;
}

.keystone-input, .health-input {
    flex: 1;
    max-width: 120px;
    padding: 10px 15px;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.keystone-input:focus, .health-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.health-input {
    max-width: 150px;
}

.input-buttons {
    display: flex;
    gap: 5px;
}

.btn-adjust {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb000 100%);
    border: none;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-adjust:hover {
    background: linear-gradient(135deg, #ffb000 0%, #ff8c00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.input-hint {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* === RESULTS SECTION === */
.calculator-results-section {
    margin-bottom: 30px;
}

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

.results-header h3 {
    color: #ffd700;
    font-size: 20px;
    margin: 0;
}

.results-header i {
    margin-right: 10px;
}

.modifier-results {
    margin-bottom: 25px;
}

.result-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: #ffd700;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}

.result-card h4 {
    color: #ffd700;
    margin: 0 0 15px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modifier-card {
    text-align: center;
}

.modifier-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.modifier-value {
    font-size: 32px;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.modifier-label {
    font-size: 14px;
    color: #ccc;
}

.calculated-health {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

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

.health-value {
    font-size: 20px;
    font-weight: bold;
    color: #4ecdc4;
}

/* === REWARDS SECTION === */
.rewards-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.reward-card, .crest-card, .vault-card {
    text-align: center;
}

.reward-info, .crest-info, .vault-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.gear-info, .vault-gear {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ilvl-badge, .vault-ilvl {
    font-size: 24px;
    font-weight: bold;
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #4ecdc4;
}

.track-info, .vault-track {
    font-size: 14px;
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

.crest-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.crest-display.gilded {
    --crest-color: #ffd700;
}

.crest-display.runed {
    --crest-color: #9d4edd;
}

.crest-amount {
    font-size: 24px;
    font-weight: bold;
    color: var(--crest-color, #ffd700);
    background: rgba(255, 215, 0, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--crest-color, #ffd700);
}

.crest-display.runed .crest-amount {
    background: rgba(157, 78, 221, 0.2);
}

.crest-type {
    font-size: 12px;
    color: #ccc;
    text-align: center;
    max-width: 120px;
    line-height: 1.3;
}

/* === REFERENCE TABLES === */
.reference-tables-section {
    margin-bottom: 30px;
}

.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reference-header h3 {
    color: #ffd700;
    margin: 0;
    font-size: 18px;
}

.btn-toggle-tables {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-toggle-tables:hover {
    background: linear-gradient(135deg, #44a08d 0%, #093637 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.3);
}

.reference-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.table-container {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #444;
}

.table-container h4 {
    color: #ffd700;
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 16px;
}

.data-table, .rewards-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.data-table th, .data-table td,
.rewards-data-table th, .rewards-data-table td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid #444;
}

.data-table th, .rewards-data-table th {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-weight: bold;
    font-size: 12px;
}

.data-table td, .rewards-data-table td {
    color: #e0e0e0;
    font-size: 12px;
}

.data-table tr.highlighted,
.rewards-data-table tr.highlighted {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
}

.rewards-data-table .level-cell {
    font-weight: bold;
    color: #ffd700;
}

.rewards-data-table .ilvl {
    font-weight: bold;
    color: #4ecdc4;
}

.rewards-data-table .track {
    font-size: 10px;
    color: #ccc;
    display: block;
}

.rewards-data-table .crest-amount {
    font-weight: bold;
    color: #ffd700;
}

.rewards-data-table .crest-name {
    font-size: 10px;
    color: #ccc;
    display: block;
}

.rewards-data-table .vault-ilvl {
    font-weight: bold;
    color: #4ecdc4;
}

.rewards-data-table .vault-track {
    font-size: 10px;
    color: #ccc;
    display: block;
}

/* === TIPS SECTION === */
.calculator-tips-section {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #444;
}

.calculator-tips-section h3 {
    color: #ffd700;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 18px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tip-card {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.tip-card:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.2);
}

.tip-card i {
    font-size: 24px;
    color: #ffd700;
    margin-bottom: 10px;
}

.tip-card h4 {
    color: #ffd700;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.tip-card p {
    color: #ccc;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .keystone-calculator-container {
        padding: 15px;
    }

    .input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .input-group label {
        min-width: auto;
    }

    .rewards-results {
        grid-template-columns: 1fr;
    }

    .reference-content {
        grid-template-columns: 1fr;
    }

    .reference-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

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

    .data-table th, .data-table td,
    .rewards-data-table th, .rewards-data-table td {
        padding: 6px 8px;
        font-size: 10px;
    }

    .modifier-value {
        font-size: 28px;
    }

    .ilvl-badge, .vault-ilvl, .crest-amount {
        font-size: 20px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .keystone-calculator-container {
        padding: 10px;
    }

    .calculator-input-section,
    .result-card,
    .table-container,
    .calculator-tips-section {
        padding: 15px;
    }

    .modifier-value {
        font-size: 24px;
    }

    .ilvl-badge, .vault-ilvl, .crest-amount {
        font-size: 18px;
        padding: 4px 10px;
    }

    .data-table, .rewards-data-table {
        font-size: 9px;
    }

    .btn-adjust {
        width: 30px;
        height: 30px;
    }
}

/* === LOADING SPINNER === */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 70px;
    text-align: center;
}

.spinner > div {
    width: 18px;
    height: 18px;
    background-color: #ffd700;
    border-radius: 100%;  
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1.0);
    }
}

.loading-message {
    color: #e0e0e0;
    margin-top: 20px;
    font-size: 16px;
}