/* c:\xampp\htdocs\a1_promax\skills_tests\css\style.css */

:root {
    --primary: #10b981;
    --primary-rgb: 16, 185, 129;
    --secondary: #06b6d4;
    --secondary-rgb: 6, 182, 212;
    --accent: #fbbf24;
    --bg: #0f172a;
    --surface: rgba(30, 41, 59, 0.65);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Ambient Glow Backgrounds */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.orb-1 {
    position: absolute; top: -10%; right: -5%; width: 550px; height: 550px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    animation: float1 20s ease-in-out infinite alternate;
}
.orb-2 {
    position: absolute; bottom: -10%; left: -5%; width: 550px; height: 550px;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.12) 0%, transparent 70%);
    animation: float2 25s ease-in-out infinite alternate-reverse;
}
@keyframes float1 { 0% { transform: translate(0, 0); } 100% { transform: translate(-80px, 80px); } }
@keyframes float2 { 0% { transform: translate(0, 0); } 100% { transform: translate(80px, -80px); } }

/* Navigation */
.navbar {
    padding: 1.25rem 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-border);
    position: sticky; top: 0; z-index: 1000;
}
.container {
    width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 1rem;
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.brand {
    font-size: 1.6rem; font-weight: 900; text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    display: flex; align-items: center; gap: 0.6rem;
}

.btn-home {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1.3rem; border-radius: 50px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--surface-border);
    color: var(--text-main); font-weight: 700; text-decoration: none;
    transition: all 0.3s;
}
.btn-home:hover {
    background: var(--primary); border-color: var(--primary);
    box-shadow: 0 8px 20px -5px rgba(var(--primary-rgb), 0.4); transform: translateY(-2px);
}

/* Hero Header */
.hero { text-align: center; padding: 4.5rem 0 3.5rem; position: relative; }
.badge-premium {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 1.15rem; border-radius: 50px; font-weight: 800; font-size: 0.85rem;
    background: rgba(var(--primary-rgb), 0.12); border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: #34d399; margin-bottom: 1.25rem;
}
.hero h1 { font-size: 2.8rem; font-weight: 900; margin-bottom: 1rem; line-height: 1.3; }
.hero h1 span { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-muted); font-size: 1.15rem; max-width: 750px; margin: 0 auto; line-height: 1.7; }

/* Search Bar */
.search-box {
    max-width: 550px; margin: 2rem auto 3.5rem;
    position: relative;
}
.search-input {
    width: 100%; padding: 1.1rem 3.25rem 1.1rem 1.5rem; border-radius: 50px;
    background: var(--surface); border: 1px solid var(--surface-border);
    color: var(--text-main); font-size: 1rem; outline: none;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: 0.3s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.25); }
.search-icon { position: absolute; right: 1.4rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.15rem; }

/* User Stats widgets */
.user-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}
.stat-widget {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 1.25rem;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s;
}
.stat-widget:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.3);
}
.stat-widget i { font-size: 1.4rem; color: var(--primary); margin-bottom: 0.25rem; }
.stat-widget span { display: block; font-size: 0.8rem; color: var(--text-muted); font-weight: 700; }
.stat-widget strong { display: block; font-size: 1.4rem; font-weight: 900; color: #fff; margin-top: 0.15rem; }

/* Grid and Cards */
.tests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 2.5rem; margin-bottom: 6rem; }

.test-card {
    background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg);
    padding: 2.25rem; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column; position: relative; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.test-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: height 0.3s;
}
.test-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.2); }
.test-card:hover::before { height: 6px; }

.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }

.test-icon {
    width: 68px; height: 68px; border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff;
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.25);
    transition: transform 0.4s;
}
.test-card:hover .test-icon {
    transform: scale(1.1) rotate(5deg);
}

.badge-type {
    background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.35rem 0.95rem; border-radius: 50px; font-weight: 800; font-size: 0.78rem;
    display: flex; align-items: center; gap: 0.4rem;
}

.test-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 0.75rem; color: #fff; }
.test-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; margin-bottom: 1.5rem; flex-grow: 1; }

/* Progress Container in card */
.test-progress-container {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.progress-header {
    display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.4rem;
}
.progress-bar-wrap {
    height: 6px; background: rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); width: 0%; transition: width 0.8s ease;
}
.test-score-badge {
    background: rgba(255,255,255,0.08);
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
}
.test-score-badge.passed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
.test-score-badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.test-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.tag-item { background: rgba(255,255,255,0.05); border: 1px solid var(--surface-border); padding: 0.25rem 0.75rem; border-radius: 8px; font-size: 0.78rem; color: var(--text-muted); }

.test-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--surface-border); }

.btn-start {
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff;
    padding: 0.75rem 1.75rem; border-radius: 14px; font-weight: 800; text-decoration: none;
    display: flex; align-items: center; gap: 0.6rem; transition: 0.3s; border: none; cursor: pointer;
    width: 100%; justify-content: center;
}
.btn-start:hover { transform: translateY(-3px); box-shadow: 0 12px 22px -5px rgba(var(--primary-rgb), 0.45); filter: brightness(1.1); }

.btn-locked {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid var(--surface-border) !important;
    box-shadow: none !important;
}

/* Footer */
.footer { background: rgba(15, 23, 42, 0.95); padding: 3rem 0; border-top: 1px solid var(--surface-border); text-align: center; margin-top: auto; }
.footer p { color: var(--text-muted); font-size: 0.9rem; }

@media(max-width: 768px) {
    .hero h1 { font-size: 2.1rem; }
    .test-card { padding: 1.75rem; }
    .user-stats-bar { grid-template-columns: 1fr; gap: 1rem; }
    .tests-grid { grid-template-columns: 1fr; }
}
