/* ===== SETUP PAGE STYLES ===== */
.setup-page {
    min-height: 100vh;
    background: var(--bg-dark);
    padding-top: 70px;
}

/* Setup Header */
.setup-header {
    padding: 2rem 0;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
}

.setup-header .container {
    max-width: 1000px;
}

.setup-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 600;
}

.setup-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.4;
}

/* Setup Navigation */
.setup-nav {
    background: var(--bg-card);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.setup-nav .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 1000px;
}

.nav-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.nav-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    font-weight: 600;
}

/* Setup Content */
.setup-content {
    padding: 2.5rem 0;
    min-height: calc(100vh - 250px);
}

.settings-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Settings Section */
.settings-section {
    margin-bottom: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.section-title i {
    color: var(--accent);
    font-size: 1.3rem;
}

/* Settings Grid - ZWIEKSZONE */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-card {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: var(--transition);
}

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

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.setting-name {
    color: var(--text-gray);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    flex: 1;
    min-width: 180px;
    padding-right: 1rem;
}

.setting-value {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    flex: 1;
    text-align: right;
    word-break: break-word;
    min-width: 100px;
}

/* Code Blocks */
.code-block {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--primary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-right: 70px;
}

.code-block code {
    font-family: inherit;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
}

.copy-btn.copied {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
}

/* Download Button */
.download-section {
    text-align: center;
    margin-top: 2rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.download-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

.loading-state p {
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem;
}

.error-state i {
    font-size: 3rem;
    color: #ff4444;
    margin-bottom: 1.5rem;
}

.error-state h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-state p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Binds Table - POPRAWIONY */
.binds-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.binds-table th,
.binds-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    vertical-align: top;
}

.binds-table th {
    background: var(--bg-darker);
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.binds-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.binds-table td:first-child {
    font-weight: 600;
    color: var(--accent);
    font-size: 1.1rem;
    white-space: nowrap;
    width: 100px;
}

.binds-table td:nth-child(2) {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: var(--primary);
    font-size: 0.95rem;
    white-space: nowrap;
    width: 200px;
}

.binds-table td:last-child {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.4;
    min-width: 200px;
}

/* Config Info */
.config-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.config-info p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

.config-info strong {
    color: var(--primary);
    font-weight: 600;
}

.full-config {
    max-height: 500px;
    overflow-y: auto;
}

.full-config pre {
    font-size: 0.9rem;
    line-height: 1.5;
}

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

/* Responsive Setup */
@media (max-width: 992px) {
    .settings-container {
        max-width: 95%;
    }
    
    .settings-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .setup-content {
        padding: 2rem 0;
    }
    
    .setup-title {
        font-size: 1.75rem;
    }
    
    .setup-subtitle {
        font-size: 0.95rem;
    }
    
    .settings-section {
        padding: 1.5rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .setting-name {
        font-size: 0.95rem;
        min-width: 150px;
    }
    
    .setting-value {
        font-size: 1rem;
    }
    
    .binds-table {
        display: block;
        overflow-x: auto;
    }
    
    .binds-table th,
    .binds-table td {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .nav-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .setup-header {
        padding: 1.5rem 0;
    }
    
    .setup-title {
        font-size: 1.5rem;
    }
    
    .setup-subtitle {
        font-size: 0.9rem;
    }
    
    .setup-nav .container {
        gap: 0.4rem;
    }
    
    .nav-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .settings-section {
        padding: 1.25rem;
    }
    
    .setting-card {
        padding: 1.25rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .setting-name, .setting-value {
        text-align: left;
        width: 100%;
    }
    
    .code-block {
        padding: 1.25rem;
    }
    
    .code-block pre {
        font-size: 0.85rem;
        padding-right: 60px;
    }
    
    .copy-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}