:root {
    --primary-color: #007aff;
    --secondary-color: #5856d6;
    --accent-color: #ff2d55;
    --bg-color: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #000;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Glassmorphism Enhancement */
.card,
.contact-container,
.project-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important;
    border-radius: 24px !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo a {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Sections */
section {
    padding: 140px 10% 80px;
    min-height: 90vh;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 5rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: -2px;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 5.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -4px;
    line-height: 1.1;
    display: flex;
    gap: 0.2rem;
}

.logo-text span {
    display: inline-block;
    animation: letter-float 3s ease-in-out infinite;
    transition: var(--transition);
    cursor: default;
}

.logo-text span:hover {
    color: var(--primary-color);
    transform: translateY(-20px) scale(1.2);
    text-shadow: 0 0 30px var(--primary-color);
}

@keyframes letter-float {

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

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

.logo-text span:nth-child(1) {
    animation-delay: 0.1s;
}

.logo-text span:nth-child(2) {
    animation-delay: 0.2s;
}

.logo-text span:nth-child(3) {
    animation-delay: 0.3s;
}

.logo-text span:nth-child(4) {
    animation-delay: 0.4s;
}

.logo-text span:nth-child(5) {
    animation-delay: 0.5s;
}

.logo-text span:nth-child(6) {
    animation-delay: 0.6s;
}

.logo-text span:nth-child(7) {
    animation-delay: 0.7s;
}

.social-icons {
    margin-top: 2.5rem;
    display: flex;
    gap: 2rem;
}

.social-icons a {
    font-size: 1.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-8px);
}

/* Timeline */
.timeline {
    max-width: 900px;
    margin: 0 auto;
    border-left: 2px solid var(--glass-border);
    padding-left: 3rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.7rem;
    top: 5px;
    width: 1.4rem;
    height: 1.4rem;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-color);
}

/* Projects */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 2rem;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.4);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 3rem;
}

.project-card {
    padding: 1.5rem;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Contact Form UI - Dark Glass Theme */
.contact-form input,
.contact-form textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.2rem;
    border-radius: 14px;
    color: #fff !important;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.2) !important;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.2rem 3rem;
    border-radius: 14px;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.4);
}

/* Form Preloader Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loader-container {
    text-align: center;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(0, 122, 255, 0.3);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: pulse 2s infinite;
    text-transform: uppercase;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

footer {
    padding: 5rem;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    section {
        padding: 120px 5% 60px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

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

    .contact-container {
        padding: 2rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    right: 20px;
    top: 30%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.theme-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn.active {
    border-color: white;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.theme-btn::after {
    content: '';
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    white-space: nowrap;
}

.theme-btn:nth-child(1)::after { content: 'Original Blue'; }
.theme-btn:nth-child(2)::after { content: 'Purple Rain'; }
.theme-btn:nth-child(3)::after { content: 'Emerald Green'; }
.theme-btn:nth-child(4)::after { content: 'Luxury Gold'; }

.theme-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}


/* Chat Widget */
.chat-widget {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-btn {
    width: 65px;
    height: 65px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: float-btn 3s ease-in-out infinite;
    position: relative;
}

.chat-hint {
    position: absolute;
    right: 85px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    color: #333;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: hint-fade 4s infinite;
}

.chat-hint::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid #f0f0f0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

@keyframes hint-fade {
    0%, 100% { opacity: 0.8; transform: translateY(-50%) translateX(0); }
    50% { opacity: 1; transform: translateY(-50%) translateX(-5px); }
}

@keyframes float-btn {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.chat-btn:hover {
    transform: scale(1.1) rotate(5deg);
    animation-play-state: paused;
}

.chat-box {
    width: 380px;
    height: 550px;
    background: #0f111a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin-bottom: 20px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    animation: slideUp 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    backdrop-filter: blur(20px);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.msg.guest {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.msg.admin {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: #eee;
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 15px;
    color: white;
    outline: none;
}

.send-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.send-btn:hover {
    background: var(--secondary-color);
}

@media (max-width: 480px) {
    .chat-box {
        width: calc(100vw - 40px);
        height: 450px;
    }
}