:root {
    --bg-base: #060D17;
    --bg-panel: rgba(10, 22, 40, 0.85);
    --bg-input: #0F1E36;
    --bg-hover: rgba(52, 152, 219, 0.1);

    --border-light: rgba(52, 152, 219, 0.2);
    --border-highlight: rgba(52, 152, 219, 0.5);

    --text-main: #F8FAFC;
    --text-muted: #94A3B8;

    --primary: #3498DB;
    --primary-hover: #2980B9;
    --accent: #2ECC71;
    --warn: #F1C40F;
    --danger: #E74C3C;

    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(52, 152, 219, 0.2);

    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

svg {
    display: block;
}

.w-3 {
    width: 0.75rem;
}

.h-3 {
    height: 0.75rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.inline {
    display: inline;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary);
}

.text-white {
    color: #fff;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.font-bold {
    font-weight: 700;
}

.opacity-50 {
    opacity: 0.5;
}

.break-all {
    word-break: break-all;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
}

.btn-outline {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--border-highlight);
}

.btn-icon {
    padding: 0.375rem;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.375rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.625rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.flag-secure {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.flag-httponly {
    background: rgba(241, 196, 15, 0.15);
    color: var(--warn);
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.flag-samesite {
    background: rgba(155, 89, 182, 0.15);
    color: #B388FF;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.flag-jwt {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Layout Variables */
.app-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
    z-index: 10;
}

.brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.code-input,
.text-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    outline: none;
    transition: all 0.2s;
    resize: vertical;
}

.code-input {
    height: 180px;
    line-height: 1.5;
}

.code-input:focus,
.text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.stats-panel {
    display: flex;
    gap: 0.5rem;
}

.stat-box {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
}

.stat-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* Main Area */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    background-color: var(--bg-base);
    background-image: radial-gradient(circle at 50% 0%, rgba(52, 152, 219, 0.05) 0%, transparent 50%);
}

.topbar {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.topbar h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.cookie-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.empty-state {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-light);
}

.cookie-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cookie-card.active {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.05);
}

.cc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cc-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    word-break: break-all;
}

.cc-domain {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.cc-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.cc-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    background: var(--bg-input);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Detail Sidebar */
.detail-panel {
    width: 400px;
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: absolute;
    right: -400px;
    top: 0;
    bottom: 0;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 20;
}

.detail-panel.open {
    right: 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.detail-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.prop-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
}

.prop-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

.prop-val.large {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.code-block {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    color: #a9b7c6;
}

/* JWT Decode Specific */
.jwt-header {
    color: #E74C3C;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.json-key {
    color: #3498DB;
}

.json-string {
    color: #A6E22E;
}

.json-number {
    color: #FD971F;
}

.json-boolean {
    color: #AE81FF;
}