/* Design System & Variables */
:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(22, 30, 49, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --primary-gradient: linear-gradient(135deg, #8b5cf6, #3b82f6);
    --secondary-gradient: linear-gradient(135deg, #ec4899, #8b5cf6);
    --success-gradient: linear-gradient(135deg, #10b981, #059669);
    
    --color-primary: #8b5cf6;
    --color-secondary: #ec4899;
    --color-blue: #3b82f6;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.15);
    --shadow-glow-success: 0 0 25px rgba(16, 185, 129, 0.15);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Background Elements */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.08;
    pointer-events: none;
}

.glow-sphere {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    animation: float 20s ease-in-out infinite alternate;
}

.orange-glow {
    background: var(--color-secondary);
    top: -10%;
    right: -10%;
}

.blue-glow {
    background: var(--color-blue);
    bottom: -10%;
    left: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Container */
.app-container {
    width: 100%;
    max-width: 1280px;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Header */
.app-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Main Card */
.main-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

/* Dropzone Area */
.dropzone-area {
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(139, 92, 246, 0.02);
    position: relative;
}

.dropzone-area:hover, .dropzone-area.dragover {
    border-color: var(--color-primary);
    background: rgba(139, 92, 246, 0.06);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.file-input-hidden {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}

.upload-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.dropzone-area:hover .upload-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.upload-icon {
    width: 32px;
    height: 32px;
}

.dropzone-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.dropzone-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.browse-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}

.supported-formats {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Settings Panel */
.settings-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Custom Select Dropdown */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '↓';
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}

select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

select option {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

/* Custom Slider */
.label-with-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#qualityValue {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    margin-top: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform 0.1s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform 0.1s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Hidden elements helper */
.hidden {
    display: none !important;
}

/* Queue Section */
.queue-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.queue-header h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Queue List & Cards */
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* Custom Scrollbar for Queue */
.queue-list::-webkit-scrollbar {
    width: 6px;
}

.queue-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.queue-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.queue-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Queue Item Card */
.queue-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.queue-item-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* Alt Input styling */
.alt-input-wrapper {
    margin-top: 0.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.alt-input-wrapper label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.alt-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.alt-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
}

/* HTML Snippet preview */
.html-preview-wrapper {
    margin-top: 0.5rem;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
    animation: fadeIn 0.3s ease;
}

.html-code {
    font-family: monospace;
    font-size: 0.8rem;
    color: #38bdf8; /* light blue */
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.45;
    width: 100%;
    text-align: left;
}

.btn-copy-code {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-weight: 600;
}

.btn-copy-code:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.queue-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Thumbnails */
.item-thumbnail-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Section */
.item-info {
    flex-grow: 1;
    min-width: 0; /* allows text truncation */
}

.item-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-size-badge {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.size-reduction {
    color: var(--color-success);
    font-weight: 600;
}

.size-increase {
    color: var(--color-warning);
    font-weight: 600;
}

/* Arrow divider */
.arrow-separator {
    color: var(--text-muted);
}

/* Status badge */
.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-badge.pending {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.status-badge.processing {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

/* Progress circle icon helper */
.spinner-icon {
    animation: rotate 1s linear infinite;
    width: 12px;
    height: 12px;
}

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

/* Item actions on right */
.item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-success {
    background: var(--success-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-glow-success);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Icon Buttons (e.g. download single, remove) */
.btn-icon-only {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-icon-only.download {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.btn-icon-only.download:hover {
    background: var(--color-success);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.btn-icon-only.remove {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

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

/* Action Bar (Summary & Buttons) */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
    .action-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

.status-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.4rem;
    border-radius: 14px;
    width: 100%;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tab-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.tab-icon {
    width: 18px;
    height: 18px;
}

.suite-badge {
    font-size: 0.7rem;
    background: var(--secondary-gradient);
    color: #ffffff;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    margin-left: 0.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* Tab Display Logic */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active-content {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Audit Page Layout */
.audit-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

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

.audit-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.audit-form h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.audit-input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.audit-input-field:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.audit-textarea {
    width: 100%;
    height: 250px;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s ease;
}

.audit-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.btn-full-width {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    border-radius: 12px;
}

/* Audit Results Dashboard */
.audit-results {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease;
}

/* Score Radial Dial */
.score-circle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.score-radial {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(#131924 60%, transparent 61%), 
                conic-gradient(var(--color-primary) 0%, rgba(255,255,255,0.05) 0%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-glow);
}

.score-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.score-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Analysis Checklist */
.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.analysis-list h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.analysis-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.check-status {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-status.status-pending::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.check-status.status-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}
.check-status.status-success::before {
    content: '✓';
    font-weight: 800;
    font-size: 0.65rem;
}

.check-status.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}
.check-status.status-failed::before {
    content: '✗';
    font-weight: 800;
    font-size: 0.65rem;
}

.check-status.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}
.check-status.status-warning::before {
    content: '!';
    font-weight: 800;
    font-size: 0.7rem;
}

/* Recommendations suggestions */
.actionable-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.actionable-suggestions h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.suggestions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.suggestions-list li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1rem;
    line-height: 1.4;
}

.suggestions-list li::before {
    content: '•';
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: 800;
}

/* Link Checker Page */
.links-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.links-layout h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.links-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.links-results-panel {
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.4s ease;
}

.links-summary-bar {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.02);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.summary-metric {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.metric-val {
    color: #ffffff;
    font-weight: 700;
}

.metric-success .metric-val {
    color: var(--color-success);
}

.metric-danger .metric-val {
    color: var(--color-danger);
}

/* Links Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    max-height: 400px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.links-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.links-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.links-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.link-anchor-text {
    font-weight: 500;
}

.link-url {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.8rem;
}

.link-url a {
    color: var(--color-blue);
    text-decoration: none;
}

.link-url a:hover {
    text-decoration: underline;
}

.badge-status {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-block;
}

.badge-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.badge-status.broken {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

.badge-status.checking {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
    animation: pulse 1.5s infinite alternate;
}

.badge-status.redirect {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

@keyframes pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* WYSIWYG Editor Styles */
.wysiwyg-editor {
    background: transparent;
    color: var(--text-primary);
}

.wysiwyg-editor[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    opacity: 0.6;
}

.wysiwyg-editor h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.wysiwyg-editor h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    color: #ffffff;
}

.wysiwyg-editor p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.wysiwyg-editor ul, .wysiwyg-editor ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.wysiwyg-editor li {
    margin-bottom: 0.25rem;
}

.wysiwyg-editor a {
    color: #38bdf8;
    text-decoration: underline;
}

.wysiwyg-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.75rem 0;
    display: block;
}

.toolbar-btn {
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.toolbar-btn.active-style {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
}

.mode-btn {
    transition: all 0.2s ease;
}

.mode-btn:hover {
    color: #ffffff !important;
}

.mode-btn.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.2);
}

/* Footer */
.app-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 1rem 0;
}

/* PDF Page Sorting and Layout */
.pdf-page-card {
    background: #18152e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    cursor: grab;
    transition: all 0.2s ease, border-color 0.2s, transform 0.2s;
    user-select: none;
}

.pdf-page-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pdf-page-card:active {
    cursor: grabbing;
}

.pdf-page-card.dragging {
    opacity: 0.4;
    border: 2px dashed #8b5cf6;
}

.pdf-page-card.drag-over {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
    transform: scale(1.03);
}

.pdf-page-thumbnail {
    background: #0d0b1a;
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.pdf-page-thumbnail canvas {
    max-width: 100%;
    max-height: 140px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.pdf-page-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pdf-page-title {
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-page-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(139, 92, 246, 0.85);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pdf-page-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}

.pdf-btn {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.35rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.pdf-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.pdf-btn.rotate-btn:hover {
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.pdf-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
