:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-bg: #1e293b;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

/* Hero Section */
.hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

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

/* CSS Mockups */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 260px;
    height: 520px;
    background: #000;
    border-radius: 40px;
    border: 8px solid #333;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 2;
    overflow: hidden;
    transform: rotate(-5deg);
    animation: float 6s ease-in-out infinite;
}

.screen {
    width: 100%;
    height: 100%;
    background: #1e1e2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

.app-header {
    width: 80%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 40px;
}

.album-art {
    width: 180px;
    height: 180px;
    background: var(--secondary-gradient);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(45, 212, 191, 0.3);
}

.controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    position: relative;
}

.play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-left: 15px solid #333;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.card-mockup {
    width: 200px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    position: absolute;
    bottom: 50px;
    right: 20px;
    z-index: 3;
    transform: rotate(10deg);
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: float-delayed 6s ease-in-out infinite;
}

.chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #ffd700, #b8860b);
    border-radius: 5px;
    margin-bottom: 15px;
}

.card-lines {
    width: 80%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

@keyframes float-delayed {

    0%,
    100% {
        transform: translateY(0) rotate(10deg);
    }

    50% {
        transform: translateY(-15px) rotate(10deg);
    }
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: #0f172a;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.5);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

/* How It Works */
.how-it-works {
    padding: 5rem 0;
    position: relative;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.step h3 {
    margin-bottom: 1rem;
}

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

/* CTA Section */
.cta {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(to bottom, #0f172a, #1e1b4b);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-store {
    background: #fff;
    color: #000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.btn-store:hover {
    transform: scale(1.05);
}

.btn-store span {
    font-size: 0.8rem;
}

.btn-store strong {
    font-size: 1.2rem;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }
}

/* Smart Controls Section */
.smart-controls {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #0f172a, #131c31);
    position: relative;
    overflow: hidden;
}

.control-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.control-list {
    list-style: none;
    margin-top: 2rem;
}

.control-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.control-list .emoji {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
}

.control-list strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.control-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    width: 300px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.switch-row:last-child {
    border-bottom: none;
}

.toggle {
    width: 50px;
    height: 30px;
    background: #334155;
    border-radius: 15px;
    position: relative;
}

.toggle.active {
    background: var(--primary-gradient);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle.active::after {
    transform: translateX(20px);
}

@media (max-width: 768px) {
    .control-content {
        grid-template-columns: 1fr;
    }

    .glass-card {
        width: 100%;
        margin-top: 2rem;
    }
}

/* Contact Page */
.contact-section {
    padding: 8rem 0 5rem;
    min-height: 80vh;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.contact-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
}

select.form-control option {
    background: var(--card-bg);
    color: #fff;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.github-link:hover {
    color: #fff;
}

.github-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-content {
    /* If we want the image on the left in RTL, we might not need to change grid order if it's 1fr 1fr, 
       but typically the text comes first (right) and image second (left). 
       Grid automatically handles this unless order is forced. */
}

[dir="rtl"] .control-content {
    /* Depending on layout */
}

[dir="rtl"] .section-title {
    text-align: center;
}

[dir="rtl"] .feature-card {
    text-align: right;
}

[dir="rtl"] .control-list li {
    flex-direction: row;
    /* Icon on right, text on left */
}

[dir="rtl"] select.form-control {
    background-position: left 1rem center;
}

/* Language Switcher */
.lang-switch {
    margin-left: 1rem;
    display: flex;
    gap: 0.5rem;
}

[dir="rtl"] .lang-switch {
    margin-left: 0;
    margin-right: 1rem;
}

.lang-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-link:hover,
.lang-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}