:root {
    --primary: #8a2be2;
    --secondary: #00d4ff;
    --bg-dark: #050510;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #b0b0b0;
    --accent-glow: 0 0 20px rgba(138, 43, 226, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    padding: 20px 0;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    /* Fallback for old browsers */
    display: inline-block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
}

h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 50px;
}

/* Glass App Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Visualizer Placeholder */
.visualizer-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZD0iTTAsNTUgTDEwLDUwIEwyMCw2MCBMMzAsNDAgTDQwLDcwIEw1MCwzMCBMNjAsODAgTDcwLDIwIEw4MCw2MCBMOTAsNTAgTDEwMCw1NSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDEzOCwgNDMsIDIyNiwgMC4zKSIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+') repeat-x;
    background-size: 200px 100%;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(138, 43, 226, 0.05);
}

.custom-file-upload {
    background: linear-gradient(135deg, var(--primary), #6a11cb);
    padding: 15px 35px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    box-shadow: var(--accent-glow);
    transition: transform 0.2s;
}

.custom-file-upload:hover {
    transform: translateY(-2px);
}

.file-hint {
    margin-top: 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Controls */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
    text-align: right;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.button-group button {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
}

.button-group button.active {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="range"] {
    width: 100%;
    margin-top: 15px;
    accent-color: var(--primary);
}

.primary-btn {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(0, 212, 255, 0.3);
}

/* Progress */
#progress-container {
    margin-top: 20px;
}

.progress-bar {
    height: 8px;
    background: var(--panel-bg);
    border-radius: 4px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: var(--secondary);
    width: 0%;
    transition: width 0.3s;
}

/* Features */
.features-section {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.02);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    padding: 40px;
    background: var(--panel-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

/* FAQ */
.faq-section {
    padding: 80px 0;
}

.faq-item {
    margin-bottom: 30px;
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 12px;
}

.faq-item h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Footer */
/* Circular LED Timer */
.timer-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #050510;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2), inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.timer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #1a1a2e;
    border-top-color: #00ff88;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px #00ff88;
}

.timer-text {
    font-size: 3rem;
    font-weight: 800;
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
    z-index: 2;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Updated Footer */
footer {
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to top, #02020a, transparent);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-info .logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff, #8a2be2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    display: inline-block;
}

.footer-links ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding: 40px 0;
    }

    .footer-grid {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
}