:root {
    --primary-color: #00f260;
    --secondary-color: #0575e6;
    --accent-color: #00c6ff;
    --bg-dark: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Offset for fixed header anchor links */
}

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

/* Header */
header {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem; /* Better touch target */
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    padding-top: 80px; /* Prevent header overlap */
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 96, 0.1) 0%, transparent 60%);
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 2; /* Increased to stay above canvas */
    max-width: 800px;
    padding: 2rem;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #a8a8a8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 242, 96, 0.5);
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(5, 117, 230, 0.5);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(5, 117, 230, 0.8);
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section .container {
    flex-direction: column;
    align-items: stretch;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
    display: block; /* Changed from inline-block */
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Services Grid */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
    flex: 0 0 calc(33.333% - 1rem); /* Force 3 items per row on desktop */
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 242, 96, 0.2); /* Green glow */
}

.service-card:hover .icon {
    transform: scale(1.1);
    transition: transform 0.3s;
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

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

.service-card .desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 3rem;
}

.service-card .price {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.service-card .price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.btn-sm {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
}

.btn-sm:hover {
    background: var(--accent-color);
    color: #fff;
}

.wide {
    grid-column: 1 / -1;
}

/* Contact Section */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    text-align: center;
}

.contact-item {
    flex: 1;
    min-width: 300px;
}

.contact-item h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.contact-item .phone {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--primary-color);
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 242, 96, 0.2);
    color: var(--text-color);
}

.close-btn {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--primary-color);
}

.modal-body {
    margin-top: 1rem;
    text-align: left;
}

.modal-body h4 {
    color: var(--accent-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.modal-body ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.modal-body .highlight {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.modal-contact-btn {
    margin-top: 2rem;
    width: 100%;
    text-align: center;
}

/* Footer */
footer {
    background: #000;
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-info {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.footer-info p {
    font-size: 0.9rem;
    margin: 0;
    position: relative;
}

.footer-info p:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -0.8rem;
    color: #444;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 1rem;
    display: block;
}

.beian-link {
    color: #1e90ff; /* DodgerBlue */
    text-decoration: none;
    transition: color 0.3s;
}

.beian-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-info p:not(:last-child)::after {
        content: none;
    }

    .hero {
        padding-top: 160px; /* More padding for stacked header */
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
    
    .container {
        flex-direction: column;
        text-align: center;
        padding: 0 1rem;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .section-title {
        left: auto;
        transform: none;
        display: block;
        margin-bottom: 2rem;
    }
    
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .service-card {
        flex: 0 0 100%; /* Full width on mobile */
    }

    /* .services-grid {
        grid-template-columns: 1fr; 
    }  Removed because now using Flexbox */
}
