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

:root {
    --primary-green: #00ff41;
    --dark-green: #00cc33;
    --bg-black: #000000;
    --card-black: #111111;
    --text-gray: #cccccc;
    --border-green: #00ff4133;
    --skew-angle: 3deg;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-black: #ffffff;
    --card-black: #f8f9fa;
    --text-gray: #333333;
    --border-green: #00ff4150;
}

/* Auto Theme (System) */
[data-theme="auto"] {
    --bg-black: #000000;
    --card-black: #111111;
    --text-gray: #cccccc;
    --border-green: #00ff4133;
}

@media (prefers-color-scheme: light) {
    [data-theme="auto"] {
        --bg-black: #ffffff;
        --card-black: #f8f9fa;
        --text-gray: #333333;
        --border-green: #00ff4150;
    }
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--bg-black);
    color: var(--text-gray);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-toggle {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    background: var(--bg-black);
    color: var(--text-gray);
    border: 2px solid var(--border-green);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-green);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.theme-toggle:hover::before {
    opacity: 0.1;
}

.theme-toggle.active {
    background: var(--primary-green);
    color: var(--bg-black);
    box-shadow: 0 0 20px var(--primary-green);
    animation: themeGlow 2s ease-in-out infinite alternate;
}

@keyframes themeGlow {
    from {
        box-shadow: 0 0 20px var(--primary-green);
    }

    to {
        box-shadow: 0 0 30px var(--primary-green), 0 0 40px rgba(0, 255, 65, 0.3);
    }
}

.theme-icon {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.95);
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 2px 20px rgba(0, 255, 65, 0.1);
}

[data-theme="light"] nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
}

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

.nav-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-green);
    text-decoration: none;
    text-shadow: 0 0 10px var(--primary-green);
}

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

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-green);
    text-shadow: 0 0 5px var(--primary-green);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 65, 0.1) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

/* Hero Background Image */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

/* Hero Circle Image Container */
.hero-circle-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-green);
    box-shadow:
        0 0 30px rgba(0, 255, 65, 0.5),
        0 0 60px rgba(0, 255, 65, 0.3),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
    z-index: 0;
    background: var(--card-black);
}

.hero-circle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.hero-circle-image:hover img {
    transform: scale(1.05);
}

/* Enhanced circle glow animation */
.hero-circle-image::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-green), transparent, var(--primary-green));
    z-index: -1;
    animation: circleRotate 4s linear infinite;
}

@keyframes circleRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.8) 100%);
    z-index: -1;
}

/* Enhanced overlay for better text readability */
.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center,
            rgba(0, 255, 65, 0.1) 0%,
            transparent 70%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg, transparent 0%, rgba(0, 255, 65, 0.03) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(0, 255, 65, 0.03) 50%, transparent 100%);
    animation: matrix 20s linear infinite;
    z-index: 1;
}

/* Hero content positioning */
.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
}

/* Enhanced text shadows for better visibility over images */
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
    text-shadow:
        0 0 20px var(--primary-green),
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 255, 65, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

/* Video background support */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Parallax effect enhancement */
.hero.parallax .hero-background {
    transform: translateZ(0);
    will-change: transform;
}

/* Mobile hero adjustments */
@media (max-width: 768px) {
    .hero {
        height: 100vh;
        background-attachment: scroll;
        /* Fix for mobile parallax issues */
    }

    .hero-background {
        background-attachment: scroll;
    }

    .hero-circle-image {
        width: 300px;
        height: 300px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-circle-image {
        width: 250px;
        height: 250px;
    }
}

@keyframes matrix {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
    text-shadow: 0 0 20px var(--primary-green);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px var(--primary-green);
    }

    to {
        text-shadow: 0 0 30px var(--primary-green), 0 0 40px var(--primary-green);
    }
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary-green), var(--dark-green));
    color: var(--bg-black);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 255, 65, 0.5);
}

/* Skewed Sections */
.skewed-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

.skewed-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-black);
    transform: skewY(var(--skew-angle));
    transform-origin: top left;
    z-index: -1;
}

.skewed-section.reverse::before {
    transform: skewY(calc(-1 * var(--skew-angle)));
}

.skewed-section.primary::before {
    background: var(--bg-black);
}

.skewed-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.skewed-content.reverse {
    grid-template-columns: 1fr 1fr;
}

.skewed-content.reverse .text-content {
    order: 2;
}

.skewed-content.reverse .image-content {
    order: 1;
}

.text-content h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.text-content .features {
    list-style: none;
    margin: 2rem 0;
}

.text-content .features li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.text-content .features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
    font-size: 1.2rem;
}

.image-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--card-black) 0%, rgba(0, 255, 65, 0.1) 100%);
    border-radius: 20px;
    border: 2px solid var(--border-green);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 65, 0.05) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.image-placeholder .icon {
    font-size: 4rem;
    color: var(--primary-green);
    z-index: 2;
}

/* Image fitting styles */
.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 18px;
    /* Slightly less than container to prevent border overlap */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Hide icon when image is present */
.image-placeholder.has-image .icon {
    display: none;
}

/* Hide background effects when image is present */
.image-placeholder.has-image::before {
    display: none;
}

/* Alternative object-fit options */
.image-placeholder img.contain {
    object-fit: contain;
    background: var(--card-black);
}

.image-placeholder img.fill {
    object-fit: fill;
}

.image-placeholder img.scale-down {
    object-fit: scale-down;
    background: var(--card-black);
}

/* Image loading state */
.image-placeholder img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-placeholder img.loaded {
    opacity: 1;
}

/* Responsive image adjustments */
@media (max-width: 768px) {
    .image-placeholder {
        height: 300px;
    }
}

/* Services Grid */
.services {
    padding: 6rem 2rem;
    background: var(--bg-black);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-green);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-green);
    box-shadow: 0 0 10px var(--primary-green);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-green);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--border-green) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: scale(0);
}

.service-card:hover::before {
    transform: scale(1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-green);
    box-shadow: 0 15px 30px rgba(0, 255, 65, 0.2);
}

.service-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

.service-card p {
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* Contact Section */
.contact {
    padding: 6rem 2rem;
    background: var(--bg-black);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-item span {
    color: var(--primary-green);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.contact-form {
    background: var(--card-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-green);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-black);
    border: 2px solid var(--border-green);
    border-radius: 8px;
    color: var(--text-gray);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Message Styles */
.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    display: none;
}

.form-message.success {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
}

.form-message.error {
    background: rgba(255, 65, 65, 0.1);
    border: 2px solid #ff4141;
    color: #ff4141;
}

.form-message.warning {
    background: rgba(255, 165, 0, 0.1);
    border: 2px solid #ffa500;
    color: #ffa500;
}

/* Submit Button Loading State */
.submit-btn {
    background: linear-gradient(45deg, var(--primary-green), var(--dark-green));
    color: var(--bg-black);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn .btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

.submit-btn .btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-black);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Validation Styles */
.form-group input.valid,
.form-group textarea.valid,
.form-group select.valid {
    border-color: var(--primary-green);
}

.form-group input.invalid,
.form-group textarea.invalid,
.form-group select.invalid {
    border-color: #ff4141;
}

.form-group input.warning,
.form-group textarea.warning {
    border-color: #ffa500;
}

/* Character counter */
.char-counter {
    font-size: 0.8rem;
    color: var(--text-gray);
    opacity: 0.7;
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #ffa500;
}

.char-counter.error {
    color: #ff4141;
}

/* Connection Status */
.connection-status {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.connection-status.connected {
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-green);
    border: 1px solid var(--border-green);
}

.connection-status.disconnected {
    background: rgba(255, 65, 65, 0.1);
    color: #ff4141;
    border: 1px solid #ff4141;
}

/* Footer */
footer {
    background: var(--card-black);
    padding: 3rem 2rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-green);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-green);
}

.copyright {
    color: var(--text-gray);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-content {
        gap: 1.5rem;
    }

    .theme-switcher {
        gap: 0;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .skewed-content,
    .skewed-content.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skewed-content.reverse .text-content,
    .skewed-content.reverse .image-content {
        order: unset;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .text-content h2 {
        font-size: 2rem;
    }
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-black);
    border: 2px solid var(--border-green);
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-green);
}

.modal-title {
    color: var(--primary-green);
    font-size: 2rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--primary-green);
    background: var(--border-green);
    transform: rotate(90deg);
}

.modal-body {
    line-height: 1.8;
}

.modal-body h2 {
    color: var(--primary-green);
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
}

.modal-body h3 {
    color: var(--primary-green);
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.2rem;
}

.modal-body p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.modal-body strong {
    color: var(--primary-green);
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-black);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-green);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}
