:root {
    --primary: #e50914; /* Default red */
    --primary-glow: rgba(229, 9, 20, 0.3);
    --primary-glow-hover: rgba(229, 9, 20, 0.5);
    --primary-glow-light: rgba(229, 9, 20, 0.2);
    --font-family: 'Inter', sans-serif;
    --base-radius: 8px;
    
    /* Dark Theme (Default) */
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    --bg-card: #1f1f1f;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border: #333333;
    --glass-bg: rgba(20, 20, 20, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-dark: #f4f4f9;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --text-main: #222222;
    --text-muted: #666666;
    --border: #e0e0e0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-left: 1px solid #333;
}
::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 6px;
    border: 3px solid #1a1a1a;
}
::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Prevent FOUC: Body starts invisible until JS shows it, or just fade in */
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    opacity: 0;
    animation: bodyFadeIn 0.5s ease forwards;
}

@keyframes bodyFadeIn {
    to { opacity: 1; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    scroll-behavior: smooth;
}

main { flex: 1; }

/* NAVBAR */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: 0.4s ease;
    background: transparent;
    color: #ffffff;
}
header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 50px;
    color: var(--text-main);
}
.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    color: inherit;
}
.logo span { color: var(--primary); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
    align-items: center;
}
.nav-links a {
    color: inherit;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: 0.3s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.theme-toggle {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}
.theme-toggle:hover { color: var(--primary); }

/* HERO */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8));
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: slideUp 1s ease;
}
.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    line-height: 1.1;
    color: #fff; /* Always white in hero */
}
.hero-content p {
    font-size: 1.3rem;
    color: #e0e0e0;
    margin-bottom: 40px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 16px 36px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--base-radius);
    transition: 0.4s;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--primary-glow);
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow-hover);
    color: white;
}

/* SECTIONS */
section { padding: 100px 50px; }
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--primary);
    position: relative;
    padding-bottom: 15px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* SERVICES */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--base-radius);
    border: 1px solid var(--border);
    transition: 0.4s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}
.card p { color: var(--text-muted); line-height: 1.6; }

/* FORMS & CUSTOM CONTACT LAYOUT */
.custom-input {
    background: var(--bg-dark) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
    padding: 15px !important;
    border-radius: var(--base-radius) !important;
    width: 100%;
}
.custom-input:focus {
    outline: 1px solid var(--primary) !important;
    border-color: var(--primary) !important;
}

.star-rating-input {
    font-size: 2rem;
    display: inline-flex;
    gap: 5px;
    user-select: none;
}
.star-rating-input span {
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
}
.star-rating-input span:active {
    transform: scale(0.8);
}

.contact-container {
    display: flex;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    justify-content: center;
    flex-wrap: wrap;
}
.contact-info, .contact-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--base-radius);
    border: 1px solid var(--border);
    flex: 1;
    min-width: 300px;
}
.contact-info h3, .contact-form h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}
.contact-info p {
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.6;
}
.contact-form form input, .contact-form form textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 15px;
    color: var(--text-main);
    margin-bottom: 15px;
    border-radius: var(--base-radius);
    font-size: 0.95rem;
}
.contact-form form input:focus, .contact-form form textarea:focus {
    outline: 1px solid var(--primary);
}
.contact-form .btn {
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: var(--base-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: 0.3s;
}
.contact-form .btn:hover {
    filter: brightness(0.85);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-panel);
    padding: 50px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}
.form-group { margin-bottom: 25px; }
.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-weight: 500;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 16px;
    border-radius: var(--base-radius);
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-main);
    font-size: 1rem;
    transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow-light);
}

/* COMMENTS LIST */
.comments-list {
    margin-top: 50px;
    display: grid;
    gap: 20px;
}
.comment-box {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--base-radius);
    border: 1px solid var(--border);
}
.comment-box h4 { margin-bottom: 5px; color: var(--primary); display:flex; justify-content:space-between; }
.comment-box p { color: var(--text-muted); margin-top: 10px; }
.stars-display { color: #ffc107; font-size: 1.2rem; }

/* FOOTER */
footer {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding-top: 50px;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px 40px 50px;
}
.footer-socials a {
    color: var(--text-muted);
    text-decoration: none;
    margin-right: 20px;
    transition: 0.3s;
    font-weight: bold;
}
.footer-socials a:hover { color: var(--primary); }
.footer-contact { text-align: right; color: var(--text-muted); line-height: 1.6; }
.footer-bottom {
    text-align: center;
    padding: 20px;
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* ANIMATIONS */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header { padding: 15px 20px; flex-direction: column; gap: 15px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .hero-content h1 { font-size: 2.8rem; }
    section { padding: 60px 20px; }
    .footer-content { flex-direction: column; text-align: center; gap: 30px; }
    .footer-contact { text-align: center; }
    .form-container { padding: 30px 20px; }
}
