.profile-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 40px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.25;
    color: var(--text-dim);
}

.profile-empty h2 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.profile-empty p {
    font-family: var(--font-terminal);
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 20px;
    max-width: 400px;
    line-height: 1.4;
}

.profile-empty code {
    word-break: break-all;
    font-family: var(--font-terminal);
    font-size: 13px;
    display: inline-block;
    max-width: 100%;
}

.profile-container {
    padding: 4px 0;
}

.profile-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--bg-panel);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.profile-name-section h2 {
    font-family: var(--font-pixel);
    font-size: 13px;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.profile-name-section h2 i {
    color: var(--gold);
}

.profile-input {
    width: 100%;
    max-width: 300px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-panel);
    border-radius: 10px;
    color: var(--text-light);
    font-family: var(--font-terminal);
    font-size: 18px;
    transition: all 0.2s;
}

.profile-input:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--bg-primary);
    box-shadow: 0 0 15px rgba(255, 177, 0, 0.1);
}

.profile-input:read-only {
    cursor: not-allowed;
    opacity: 0.65;
}

.profile-input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.profile-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--bg-panel);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.profile-section h3 {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 18px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section h3 i {
    color: var(--gold);
}

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

.stat-card {
    background: var(--bg-panel);
    border: 2px solid var(--bg-panel-hover);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--border-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.stat-icon {
    font-size: 28px;
    flex-shrink: 0;
    color: var(--gold);
    opacity: 0.6;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-content .stat-label {
    color: var(--text-dim);
    font-size: 12px;
    margin-bottom: 4px;
}

.stat-value {
    font-family: var(--font-terminal);
    font-size: 18px;
    font-weight: 400;
    color: var(--text-light);
}

.stat-value-input {
    width: 100%;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-panel);
    border-radius: 8px;
    color: var(--gold);
    font-family: var(--font-terminal);
    font-size: 20px;
    font-weight: 400;
    transition: all 0.2s;
}

.stat-value-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(255, 177, 0, 0.08);
}

.stat-value-input:read-only {
    cursor: not-allowed;
    opacity: 0.7;
}

.stat-value-input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.progress-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.progress-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-item > span {
    font-family: var(--font-terminal);
    font-size: 15px;
    color: var(--text-light);
    letter-spacing: 0.3px;
}

.progress-bar-container {
    width: 100%;
    height: 22px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-panel);
    border-radius: 11px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-bright) 100%);
    border-radius: 11px;
    transition: width 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), 0 0 10px rgba(255, 177, 0, 0.15);
}

.progress-values {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-terminal);
    font-size: 15px;
    color: var(--text-dim);
}

.progress-input {
    width: 60px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-panel);
    border-radius: 8px;
    color: var(--gold);
    font-family: var(--font-terminal);
    font-size: 15px;
    font-weight: 400;
    text-align: center;
    transition: all 0.2s;
}

.progress-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 177, 0, 0.08);
}

.progress-input:read-only {
    cursor: not-allowed;
    opacity: 0.7;
}

.progress-input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.stat-total {
    margin-left: 4px;
    font-family: var(--font-terminal);
    font-size: 14px;
    color: var(--text-dim);
}

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

.deck-card {
    background: var(--bg-panel);
    border: 2px solid var(--bg-panel-hover);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s;
}

.deck-card:hover {
    border-color: var(--border-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.deck-card h4 {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--text-light);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deck-card h4 i {
    color: var(--gold);
}

.deck-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deck-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-terminal);
    font-size: 14px;
    color: var(--text-dim);
}

.deck-stat .stat-value {
    color: var(--text-light);
    font-weight: 400;
}

#toggle-edit-btn {
    transition: all 0.3s ease;
}

#toggle-edit-btn.editing {
    background: var(--blue-dark);
    border-color: var(--blue-primary);
    color: white;
}

#toggle-edit-btn.editing:hover {
    background: var(--blue-primary);
    border-color: var(--blue-bright);
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.2);
}

.editable-stat {
    width: 80px;
    padding: 6px 8px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-panel);
    border-radius: 8px;
    color: var(--text-light);
    font-family: var(--font-terminal);
    font-size: 16px;
    text-align: center;
    transition: all 0.2s;
}

.editable-stat:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 177, 0, 0.08);
}

.editable-stat:read-only {
    cursor: not-allowed;
    opacity: 0.7;
}

.editable-stat:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.editable-stat.tiny {
    width: 50px;
    font-size: 14px;
    padding: 4px 6px;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 2px solid var(--bg-panel);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background: var(--bg-panel);
}

.stats-table th {
    padding: 10px 12px;
    text-align: left;
    font-family: var(--font-pixel);
    font-size: 8.5px;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.stats-table th i {
    margin-right: 4px;
}

.stats-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--bg-panel);
    font-family: var(--font-terminal);
    font-size: 14px;
    color: var(--text-light);
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tbody tr:hover {
    background: var(--bg-panel);
}

.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-panel);
    border-radius: 10px;
    border: 2px solid var(--bg-panel-hover);
    transition: all 0.3s ease;
    cursor: pointer;
}

.challenge-item:hover {
    border-color: var(--border-dark);
    transform: translateY(-1px);
}

.challenge-item:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.challenge-item.completed {
    border-color: var(--gold);
    background: rgba(255, 177, 0, 0.06);
    box-shadow: 0 0 10px rgba(255, 177, 0, 0.06);
}

.challenge-item i {
    font-size: 18px;
    color: var(--text-dim);
}

.challenge-item.completed i {
    color: var(--gold);
}

.challenge-item span {
    font-family: var(--font-terminal);
    font-size: 15px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-controls {
        width: 100%;
    }

    .profile-controls button {
        flex: 1;
    }

    .profile-input {
        max-width: 100%;
    }

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

    .deck-stakes-grid {
        grid-template-columns: 1fr;
    }

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

    .table-container {
        font-size: 13px;
    }

    .stats-table th,
    .stats-table td {
        padding: 6px 8px;
    }

    .editable-stat,
    .editable-stat.tiny {
        width: 100%;
    }
}
