/* ==========================================================================
   Steam Workshop & Mod ID Unifier - Styling System v2.0 Pro
   Design: Modern Dark Glassmorphism, Neon Accents, Ultra-clean Tabbed Layout
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #090c15;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(26, 34, 52, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 242, 254, 0.3);
    
    /* Text Colors */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Accent Colors */
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.35);
    --secondary: #4facfe;
    --accent-purple: #7928ca;
    --accent-violet: #8a2be2;
    --accent-green: #10b981;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-card: 0 12px 32px 0 rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.25);
    --backdrop-blur: blur(16px);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Dynamic Background Glow Elements */
.background-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(121, 40, 202, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
}

.bg-glow-2 {
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
}

/* App Container */
.app-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-purple), var(--primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

.logo-area h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.header-badges {
    display: flex;
    gap: 10px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-pz {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-version {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.badge-accent {
    background: rgba(0, 242, 254, 0.15);
    color: var(--primary);
    border: 1px solid var(--border-highlight);
}

/* Main Layout Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cards (Glassmorphism) */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.highlight-card {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-card), 0 0 30px rgba(0, 242, 254, 0.1);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 .icon {
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

.padding-0 {
    padding: 0 !important;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.margin-bottom-sm {
    margin-bottom: 10px;
}

/* Tabbed Navigation Bar */
.tab-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(0, 242, 254, 0.05);
}

.tab-content {
    display: none;
}

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

/* Inputs & Textarea */
.textarea-wrapper {
    position: relative;
    margin-bottom: 14px;
}

textarea {
    width: 100%;
    min-height: 130px;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    resize: vertical;
    outline: none;
    transition: all 0.25s ease;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

textarea::placeholder {
    color: var(--text-dim);
    font-family: var(--font-sans);
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.input-hint code {
    color: var(--primary);
    background: rgba(0, 242, 254, 0.08);
    padding: 1px 4px;
    border-radius: 4px;
}

/* File Dropzone */
.file-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    margin-bottom: 14px;
}

.file-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(0, 242, 254, 0.05);
    color: var(--primary);
}

.file-label {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

/* URL Status Log */
.url-status-log {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(5, 8, 17, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.4;
}

.url-status-item {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.url-status-item.success { color: #34d399; }
.url-status-item.warning { color: #fbbf24; }
.url-status-item.error { color: #f87171; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-xs {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #050b14;
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    background: rgba(121, 40, 202, 0.2);
    color: #d8b4fe;
    border: 1px solid rgba(121, 40, 202, 0.4);
}

.btn-secondary:hover {
    background: rgba(121, 40, 202, 0.35);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger-outline:hover, .btn-danger-active {
    background: rgba(239, 68, 68, 0.35) !important;
    color: #fff !important;
    border-color: var(--danger) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    animation: pulseDanger 0.8s infinite alternate;
}

@keyframes pulseDanger {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}

/* Glowing Giant Download Button */
.btn-glow {
    background: linear-gradient(135deg, var(--accent-purple), var(--primary));
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow), 0 4px 16px rgba(121, 40, 202, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    width: 100%;
}

.btn-glow:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.5), 0 8px 24px rgba(121, 40, 202, 0.6);
}

.action-buttons-row {
    display: flex;
    gap: 12px;
}

.action-buttons-row .btn-primary {
    flex: 1;
}

/* Manual Form */
.manual-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.25s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

/* Saved Profiles Section */
.profile-save-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.profile-input {
    flex: 1;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 12px 0;
}

.profiles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 140px;
    overflow-y: auto;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.profile-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
}

.profile-actions {
    display: flex;
    gap: 6px;
}

.text-dim-sm {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Table & Search */
.search-bar-wrapper {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.search-input {
    flex: 1;
    background: rgba(10, 14, 23, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
}

.order-hint-badge {
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.table-responsive {
    max-height: 340px;
    overflow-y: auto;
}

.mod-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.mod-table th {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: sticky;
    top: 0;
    z-index: 2;
}

.mod-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-family: var(--font-mono);
}

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

.btn-order-cell {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.btn-order-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-order-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    color: var(--primary);
    border-color: var(--primary);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-danger {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.btn-icon-danger:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
}

/* Empty State */
.empty-state {
    padding: 36px 20px;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.empty-state svg {
    color: var(--text-dim);
}

.empty-state p {
    font-weight: 500;
    color: var(--text-main);
}

.empty-state span {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Formatting Options */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-group {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.option-title {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.option-title code {
    color: var(--primary);
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.toggle-option:last-child {
    margin-bottom: 0;
}

.toggle-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.toggle-label code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 5px;
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-mono);
}

/* Custom Switch Slider */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(16px);
    background-color: #050b14;
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Export Selector Dropdown */
.format-select {
    background: rgba(5, 8, 17, 0.9);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    outline: none;
    cursor: pointer;
}

/* Code Output Box */
.code-box-wrapper {
    position: relative;
    margin-bottom: 18px;
}

.code-content {
    display: block;
    background: #050811;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    color: #a5f3fc;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.copy-float-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Output Actions */
.output-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.secondary-copy-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Info Card & Shortcuts */
.info-card {
    background: rgba(18, 24, 38, 0.4);
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

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

.shortcut-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.shortcut-item code {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
}

.shortcut-item span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: #0f172a;
    color: var(--text-main);
    border: 1px solid var(--primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
}

.toast-success svg {
    color: var(--accent-green);
}

.spin {
    animation: spinRotate 1.2s linear infinite;
}

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

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
}
