:root {
    --bg-dark: #0A0A1A;
    --primary: #6C5CE7;
    --secondary: #A29BFE;
    --accent: #00B894;
    --warning: #fdcb6e;
    --error: #d63031;
    --text-main: #F8F9FA;
    --text-muted: #b2bec3;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius: 12px;
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-mono: monospace;
    --transition: all 0.25s ease;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(108, 92, 231, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(0, 184, 148, 0.08) 0%, transparent 45%);
}

.app-container {
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.glow-effect {
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.3);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    color: var(--primary);
    font-size: 1.8rem;
}

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

.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-family: var(--font-ui);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

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

/* Summary Dashboard */
.summary-section {
    position: relative;
    overflow: hidden;
}

.score-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 150px;
    max-height: 150px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease;
}

.circle.high { stroke: var(--error); }
.circle.med { stroke: var(--warning); }
.circle.low { stroke: var(--accent); }

.percentage {
    fill: var(--text-main);
    font-family: var(--font-ui);
    font-size: 0.5em;
    font-weight: 700;
    text-anchor: middle;
}

.score-details h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.score-details p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.hash-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--secondary);
}

#copy-hash-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

#copy-hash-btn:hover {
    color: var(--primary);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-card.full-width {
    grid-column: 1 / -1;
}

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

.card-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.status-badge.safe { background: rgba(0, 184, 148, 0.2); color: var(--accent); }
.status-badge.warn { background: rgba(253, 203, 110, 0.2); color: var(--warning); }
.status-badge.danger { background: rgba(214, 48, 49, 0.2); color: var(--error); }

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.label {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.value {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

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

.hash-val {
    font-family: var(--font-mono);
    color: var(--accent);
}

.canvas-preview {
    margin-top: 0.5rem;
    height: 40px;
    width: 200px;
    border: 1px solid rgba(255,255,255,0.1);
    align-self: flex-end;
    background: #fff;
    border-radius: 4px;
}

.desc-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.mitigation-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mitigation-list li {
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.mitigation-list li i {
    color: var(--accent);
    margin-top: 2px;
}

@media (max-width: 768px) {
    .score-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .score-details h2 { font-size: 1.5rem; }
    
    .data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    .value { text-align: left; }
    .canvas-preview { align-self: flex-start; }
}
