/**
 * Steam Account Worth - Styles
 * Inspired by Steam Player Stats design
 */

/* ========================================
   Wrapper and Container
======================================== */

.steam-worth-wrapper {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========================================
   Calculator Card
======================================== */

.steam-worth-calculator {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.steam-worth-header {
    background: #f5f5f5;
    padding: 24px;
    color: #000000;
    text-align: center;
    order: 0;
}

.steam-worth-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.steam-worth-description {
    margin: 0;
    font-size: 14px;
    color: #000000;
    line-height: 1.5;
}

/* ========================================
   Form
======================================== */

.steam-worth-form {
    padding: 24px;
    background: #ffffff;
    order: 1;
}

.worth-form .form-group {
    margin-bottom: 0;
}

.worth-form label {
    display: block;
    margin-bottom: 8px;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
}

.input-wrapper {
    display: flex;
    gap: 8px;
}

.worth-form .form-input {
    flex: 1;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 6px;
    color: #000000;
    font-size: 14px;
    transition: all 0.2s ease;
}

.worth-form .form-input:focus {
    outline: none;
    border-color: #67c1f5;
    background: #ffffff;
}

.worth-form .form-input::placeholder {
    color: #666666;
}

.btn-calculate {
    padding: 12px 24px;
    background: #67c1f5;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-calculate:hover {
    background: #4a9eff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(103, 193, 245, 0.3);
}

.btn-calculate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-help {
    margin-top: 12px;
    font-size: 12px;
    color: #666666;
    line-height: 1.6;
}

.form-help code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #000000;
}

/* ========================================
   Loading Indicator
======================================== */

.loading-indicator {
    padding: 32px 24px;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    order: 2;
}

.loader {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #67c1f5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.loading-progress {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #67c1f5 0%, #4a9eff 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #67c1f5;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-details {
    color: #000000;
    font-size: 13px;
    line-height: 1.6;
}

.btn-stop {
    margin-top: 16px;
    padding: 8px 16px;
    background: #dc3232;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-stop:hover {
    background: #c92222;
}

/* ========================================
   Results Display
======================================== */

.worth-results {
    padding: 24px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    order: 3;
}

.worth-result-card {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e0e0e0;
}

/* ========================================
   Player Profile
======================================== */

.worth-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
}

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

.profile-name {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-age {
    font-size: 14px;
    color: #666666;
    vertical-align: middle;
}

.profile-age img.emoji {
    height: 1.9em !important;
    width: 1.9em !important;
    vertical-align: middle;
}

.profile-value {
    text-align: right;
    margin-left: auto;
    padding-left: 16px;
}

.profile-value-label {
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.profile-value-amount {
    font-size: 32px;
    font-weight: 700;
    color: #67c1f5;
    line-height: 1;
}

.worth-statistics,
.worth-currencies {
    margin-bottom: 24px;
}

.worth-statistics h3,
.worth-currencies h3 {
    margin: 0 0 16px 0;
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.stat-item {
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    color: #666666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #000000;
    font-size: 24px;
    font-weight: 700;
}

.stat-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #999999;
    text-align: center;
}

.currency-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.currency-item {
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.currency-code {
    color: #67c1f5;
    font-weight: 600;
    font-size: 14px;
    min-width: 50px;
}

.currency-amount {
    flex: 1;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
}

.currency-usd {
    color: #666666;
    font-size: 13px;
}

.currency-count {
    color: #666666;
    font-size: 13px;
}

.worth-warning {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.worth-warning p {
    margin: 0 0 12px 0;
    color: #ffa500;
    font-size: 14px;
}

.btn-calculate-all {
    padding: 10px 20px;
    background: #67c1f5;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-calculate-all:hover {
    background: #4a9eff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(103, 193, 245, 0.3);
}

.worth-info {
    background: rgba(103, 193, 245, 0.1);
    border: 1px solid rgba(103, 193, 245, 0.3);
    border-radius: 6px;
    padding: 12px;
}

.worth-info p {
    margin: 0;
    color: #67c1f5;
    font-size: 13px;
}

/* ========================================
   Error Display
======================================== */

.worth-error {
    padding: 24px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    order: 4;
}

.steam-worth-error {
    background: rgba(220, 50, 50, 0.2);
    border: 1px solid rgba(220, 50, 50, 0.5);
    border-radius: 6px;
    padding: 16px;
    color: #ffb3b3;
    font-size: 14px;
}

/* ========================================
   Info Section
======================================== */

.steam-worth-info {
    margin-top: 24px;
    padding: 24px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.steam-worth-info h3 {
    margin: 0 0 16px 0;
    color: #000000;
    font-size: 18px;
    font-weight: 600;
}

.steam-worth-info ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
    color: #000000;
    font-size: 14px;
    line-height: 1.8;
}

.steam-worth-info li {
    margin-bottom: 8px;
}

.steam-worth-disclaimer {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.steam-worth-disclaimer h4 {
    margin: 0 0 12px 0;
    color: #ffa500;
    font-size: 16px;
    font-weight: 600;
}

.steam-worth-disclaimer ul {
    margin: 0;
    padding-left: 20px;
    color: #ffa500;
    font-size: 13px;
}

/* ========================================
   Top Games Display
======================================== */

.worth-top-games {
    margin-bottom: 24px;
}

.worth-top-games h3 {
    margin: 0 0 16px 0;
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.top-games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-game-item {
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.top-game-item:hover {
    border-color: #67c1f5;
    box-shadow: 0 2px 8px rgba(103, 193, 245, 0.2);
}

.game-rank {
    font-size: 18px;
    font-weight: 700;
    color: #67c1f5;
    min-width: 30px;
    text-align: center;
}

.game-logo {
    flex-shrink: 0;
}

.game-logo img {
    width: 120px;
    height: auto;
    border-radius: 4px;
    display: block;
}

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

.game-name {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-playtime {
    font-size: 13px;
    color: #666666;
}

.game-price {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    white-space: nowrap;
    margin-left: auto;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 768px) {
    .steam-worth-wrapper {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }

    .steam-worth-header {
        padding: 16px;
    }

    .steam-worth-header h2 {
        font-size: 20px;
    }

    .steam-worth-form {
        padding: 16px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .btn-calculate {
        width: 100%;
    }

    .worth-profile {
        flex-wrap: wrap;
    }

    .profile-value {
        flex-basis: 100%;
        text-align: left;
        padding-left: 0;
        padding-top: 12px;
        margin-left: 0;
        border-top: 1px solid #e0e0e0;
    }

    .profile-value-amount {
        font-size: 28px;
    }

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

    .currency-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .steam-worth-info {
        padding: 16px;
    }

    .top-game-item {
        flex-wrap: wrap;
    }

    .game-logo img {
        width: 80px;
    }

    .game-price {
        margin-left: 0;
        width: 100%;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .steam-worth-header h2 {
        font-size: 18px;
    }

    .steam-worth-description {
        font-size: 13px;
    }

    .profile-value-amount {
        font-size: 24px;
    }

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

    .profile-avatar {
        width: 48px;
        height: 48px;
    }

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

    .profile-age {
        font-size: 12px;
    }

    .game-rank {
        font-size: 14px;
        min-width: 25px;
    }

    .game-logo img {
        width: 60px;
    }

    .game-name {
        font-size: 14px;
    }

    .game-playtime {
        font-size: 12px;
    }

    .game-price {
        font-size: 16px;
    }
}

/* ========================================
   Print Styles
======================================== */

@media print {
    .steam-worth-wrapper {
        background: white !important;
        color: black !important;
    }

    .steam-worth-calculator,
    .worth-result-card,
    .steam-worth-info {
        border: 1px solid #ccc !important;
        background: white !important;
    }

    .steam-worth-header {
        background: #f5f5f5 !important;
        color: black !important;
    }

    .btn-calculate,
    .btn-stop,
    .btn-calculate-all,
    .loading-indicator {
        display: none !important;
    }
}
