/* === CSS Variables === */
:root {
    --bg-primary: #0f0720;
    --bg-secondary: rgba(255,255,255,0.03);
    --bg-tertiary: rgba(255,255,255,0.02);
    --card-bg: rgba(255,255,255,0.05);
    --text-primary: #f0f0f5;
    --text-secondary: rgba(255,255,255,0.5);
    --border: rgba(255,255,255,0.1);
    --border-color: rgba(255,255,255,0.1);
    --primary: #14b8a6;
    --primary-hover: #0d9488;
    --accent-teal: #14b8a6;
    --accent-indigo: #6366f1;
    --accent-rose: #f43f5e;
    --glass-bg: rgba(255,255,255,0.05);
    --glass-border: rgba(255,255,255,0.1);
    --glass-blur: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(160deg, #0f0720 0%, #1a0a2e 50%, #0f0720 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* === Animated Aurora Orbs === */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6366f1, #14b8a6);
    top: -200px;
    left: -100px;
}

body::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #f43f5e, #6366f1);
    bottom: -200px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === Header === */
.app-header {
    background: rgba(15,7,32,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 4px 30px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.header-icon { font-size: 1.5rem; }

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #14b8a6, #6366f1, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-search {
    flex: 1;
    max-width: 400px;
}

.header-search input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.header-search input::placeholder { color: rgba(255,255,255,0.35); }

.header-search input:focus {
    border-color: rgba(99,102,241,0.5);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 20px rgba(99,102,241,0.15), 0 0 40px rgba(20,184,166,0.1);
}

/* === Breadcrumb === */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.breadcrumb a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { text-decoration: underline; color: #2dd4bf; }
.breadcrumb-sep { color: rgba(255,255,255,0.25); }
.breadcrumb-current { font-weight: 600; color: var(--text-primary); }

/* === Main === */
.app-main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    position: relative;
    z-index: 1;
}

/* === Footer === */
.app-footer {
    text-align: center;
    padding: 1rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
    position: relative;
    z-index: 1;
    background: rgba(15,7,32,0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* === Card === */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.card-body { padding: 1.25rem; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-indigo));
    color: white;
    box-shadow: 0 4px 15px rgba(20,184,166,0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0d9488, #4f46e5);
    box-shadow: 0 6px 20px rgba(20,184,166,0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

.btn-danger {
    background: #dc2626;
    color: white;
}
.btn-danger:hover { background: #b91c1c; }

.btn-block { width: 100%; }

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.25rem;
    cursor: pointer;
}
.btn-small:hover {
    background: rgba(255,255,255,0.14);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* === Back button === */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--accent-teal);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.back-link:hover { text-decoration: underline; color: #2dd4bf; }

/* === Scrollbar styling === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* === Selection color === */
::selection {
    background: rgba(99,102,241,0.4);
    color: white;
}

/* === Responsive === */
@media (max-width: 768px) {
    .app-main { padding: 0 1rem 1.5rem; }
    .header-search { max-width: 250px; }
    .breadcrumb { padding: 0.75rem 1rem; }
    body::before { width: 350px; height: 350px; }
    body::after { width: 300px; height: 300px; }
}
