* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}
.container.wide {
    max-width: 1400px;
    overflow-x: hidden;
}

/* Header / Progress */
.header {
    text-align: center;
    padding: 40px 0 20px;
}
.header h1 {
    font-size: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header p {
    color: #999;
    margin-top: 8px;
    font-size: 16px;
}

.progress-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}
.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}
.progress-step.active {
    color: #667eea;
}
.progress-step.completed {
    color: #4caf50;
}
.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    background: #1a1a2e;
    border: 2px solid #333;
}
.progress-step.active .step-dot {
    border-color: #667eea;
    background: #667eea;
    color: white;
}
.progress-step.completed .step-dot {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}
.step-line {
    width: 40px;
    height: 2px;
    background: #333;
}
.progress-step.completed + .step-line,
.step-line.done {
    background: #4caf50;
}

/* Cards */
.card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #2a2a3e;
}
.card h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #fff;
}
.card h3 {
    font-size: 18px;
    margin: 20px 0 10px;
    color: #ccc;
}
.card p {
    line-height: 1.7;
    color: #bbb;
    margin-bottom: 10px;
}

/* Platform grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}
.platform-card {
    background: #12121f;
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s;
}
.platform-card:hover {
    border-color: #667eea;
}
.platform-icon {
    font-size: 36px;
    margin-bottom: 10px;
}
.platform-card h4 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 15px;
}
.platform-card a {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin: 3px;
}
.btn-plex {
    background: #e5a00d;
    color: #000;
}
.btn-jellyfin {
    background: #00a4dc;
    color: #fff;
}

/* Service sections */
.service-section {
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
    background: #12121f;
    border: 1px solid #2a2a3e;
}
.service-section h3 {
    margin-top: 0;
}
.service-section.plex { border-left: 4px solid #e5a00d; }
.service-section.jellyfin { border-left: 4px solid #00a4dc; }
.service-section.overseerr { border-left: 4px solid #6366f1; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, opacity 0.2s;
    text-align: center;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.btn-success { background: #4caf50; color: white; }
.btn-danger { background: #e74c3c; color: white; }
.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #ccc;
    font-size: 14px;
}
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #12121f;
    color: #e0e0e0;
    font-size: 15px;
}
.form-group input:focus {
    outline: none;
    border-color: #667eea;
}
.form-hint {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

/* Flash messages */
.flash {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}
.flash.error { background: #3d1515; color: #f87171; border: 1px solid #5c2020; }
.flash.success { background: #153d1f; color: #6ee7b7; border: 1px solid #1e5c2d; }
.flash.warning { background: #3d3015; color: #fbbf24; border: 1px solid #5c4a20; }
.flash.info { background: #15253d; color: #93c5fd; border: 1px solid #1e3a5c; }

/* Numbered steps */
.steps-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}
.steps-list li {
    counter-increment: step;
    padding: 12px 0 12px 50px;
    position: relative;
    line-height: 1.6;
    color: #bbb;
    border-bottom: 1px solid #1e1e30;
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}
.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #2a2a3e;
}
.admin-table th {
    color: #999;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}
.admin-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.admin-table th.sortable:hover {
    color: #667eea;
}
.admin-table th.sort-asc::after { content: " (asc)"; font-size: 9px; color: #667eea; }
.admin-table th.sort-desc::after { content: " (desc)"; font-size: 9px; color: #667eea; }
.admin-table td { color: #ccc; }

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.status-pending { background: #3d3015; color: #fbbf24; }
.status-approved { background: #153d1f; color: #6ee7b7; }
.status-denied { background: #3d1515; color: #f87171; }

/* Confirmation page */
.success-icon {
    font-size: 64px;
    text-align: center;
    margin: 20px 0;
}

/* Stat cards */
.stat-card {
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-top: 3px solid #667eea;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
}
.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}
.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Thistle Logo */
.thistle-logo {
    width: 130px;
    height: 130px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e0a14;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.3);
    overflow: hidden;
    animation: thistleGlow 4s ease-in-out infinite;
}
.thistle-icon {
}
@keyframes thistleGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.15), 0 0 80px rgba(139, 92, 246, 0.08); }
    50% { box-shadow: 0 0 60px rgba(139, 92, 246, 0.3), 0 0 100px rgba(139, 92, 246, 0.15); }
}
@keyframes thistleSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.thistle-icon .sparkle {
    animation: sparkle 2s ease-in-out infinite;
}
.thistle-icon .sparkle:nth-child(1) { animation-delay: 0s; }
.thistle-icon .sparkle:nth-child(2) { animation-delay: 0.4s; }
.thistle-icon .sparkle:nth-child(3) { animation-delay: 0.8s; }
.thistle-icon .sparkle:nth-child(4) { animation-delay: 1.2s; }
.thistle-icon .sparkle:nth-child(5) { animation-delay: 1.6s; }
@keyframes sparkle {
    0%, 100% { opacity: 0.3; r: 1.5; }
    50% { opacity: 1; r: 3; }
}

/* Aurora Background */
.aurora-container {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora-blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.aurora-1 {
    width: 500px; height: 500px; top: -10%; left: 30%;
    background: #8b5cf6; opacity: 0.07;
    animation: auroraShift 12s ease-in-out infinite;
}
.aurora-2 {
    width: 400px; height: 400px; bottom: 10%; right: 10%;
    background: #ec4899; opacity: 0.05;
    animation: auroraShift2 15s ease-in-out infinite;
}
.aurora-3 {
    width: 300px; height: 300px; top: 40%; left: 10%;
    background: #c084fc; opacity: 0.04;
    animation: auroraShift 18s ease-in-out infinite reverse;
}
@keyframes auroraShift {
    0%   { transform: translate(0%, 0%) scale(1); opacity: 0.06; }
    25%  { transform: translate(5%, -8%) scale(1.1); opacity: 0.08; }
    50%  { transform: translate(-3%, 5%) scale(0.95); opacity: 0.05; }
    75%  { transform: translate(-6%, -3%) scale(1.05); opacity: 0.07; }
    100% { transform: translate(0%, 0%) scale(1); opacity: 0.06; }
}
@keyframes auroraShift2 {
    0%   { transform: translate(0%, 0%) scale(1); opacity: 0.04; }
    33%  { transform: translate(-8%, 6%) scale(1.15); opacity: 0.06; }
    66%  { transform: translate(6%, -4%) scale(0.9); opacity: 0.035; }
    100% { transform: translate(0%, 0%) scale(1); opacity: 0.04; }
}

/* Floating Particles */
.particles {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
    position: absolute; bottom: -10px; border-radius: 50%;
    background: #8b5cf6; opacity: 0;
    animation: particleFloat linear infinite;
}
.particle:nth-child(1) { width: 3px; height: 3px; left: 10%; animation-duration: 14s; animation-delay: 0s; }
.particle:nth-child(2) { width: 2px; height: 2px; left: 25%; animation-duration: 18s; animation-delay: 2s; background: #ec4899; }
.particle:nth-child(3) { width: 4px; height: 4px; left: 45%; animation-duration: 12s; animation-delay: 4s; }
.particle:nth-child(4) { width: 2px; height: 2px; left: 60%; animation-duration: 22s; animation-delay: 1s; background: #ec4899; }
.particle:nth-child(5) { width: 3px; height: 3px; left: 75%; animation-duration: 16s; animation-delay: 3s; }
.particle:nth-child(6) { width: 2px; height: 2px; left: 85%; animation-duration: 20s; animation-delay: 5s; background: #ec4899; }
@keyframes particleFloat {
    0%   { transform: translateY(0px) translateX(0px); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-800px) translateX(40px); opacity: 0; }
}

/* Admin nav */
.admin-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.admin-nav a {
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    transition: all 0.2s;
}
.admin-nav a:hover {
    color: #fff;
    border-color: #667eea;
}
.admin-nav a.active {
    color: #fff;
    background: #667eea;
    border-color: #667eea;
}

/* Responsive */
@media (max-width: 600px) {
    .container { padding: 15px; }
    .card { padding: 20px; }
    .header h1 { font-size: 24px; }
    .platform-grid { grid-template-columns: 1fr; }
    .progress-bar { flex-wrap: wrap; }
    .step-line { display: none; }
    .admin-table { font-size: 12px; }
    .admin-table th, .admin-table td { padding: 8px; }
}
