/* ========================================
   PIXANITHING - Global Stylesheet
   Version: 3.0.0 (Final)
   Author: PIXANITHING
   Description: Complete global styles for all pages
   ======================================== */

/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
    /* ===== COLORS - DARK THEME (Default) ===== */
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-card: #1A1A1A;
    --bg-card-hover: #242424;
    --bg-input: #1E1E1E;

    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #6B6B6B;

    --accent-primary: #6C63FF;
    --accent-secondary: #FF6B35;
    --accent-gradient: linear-gradient(135deg, #6C63FF, #FF6B35);

    --border-color: #2A2A2A;
    --border-light: rgba(255, 255, 255, 0.05);

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 35px rgba(108, 99, 255, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    --header-height: 72px;
    --container-width: 1200px;

    --z-nav: 1000;
    --z-modal: 2000;
    --z-tooltip: 3000;
    --z-preloader: 9999;
}

/* ========================================
   LIGHT THEME
   ======================================== */
[data-theme="light"] {
    --bg-primary: #F8F9FA;
    --bg-secondary: #F1F3F5;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F3F5;
    --bg-input: #E9ECEF;

    --text-primary: #1A1A1A;
    --text-secondary: #495057;
    --text-muted: #868E96;

    --border-color: #E9ECEF;
    --border-light: rgba(0, 0, 0, 0.05);

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 35px rgba(108, 99, 255, 0.12);
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

/* ===== SELECTION ===== */
::selection {
    background: var(--accent-primary);
    color: #FFFFFF;
}

/* ===== TYPOGRAPHY ===== */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    list-style: none;
}

/* ===== CONTAINER ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   PRELOADER
   ======================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-preloader);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-bottom-color: var(--accent-secondary);
    animation: spin 0.8s linear infinite;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-nav);
    background: rgba(var(--bg-primary), 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    height: var(--header-height);
}

header.scrolled {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    transition: var(--transition);
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.logo i {
    color: var(--accent-primary);
    font-size: 28px;
}

.logo span {
    color: var(--accent-primary);
}

/* ===== NAV MENU ===== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
    transition: var(--transition);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* ===== NAV ACTIONS ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: rotate(30deg);
}

/* Login Button */
.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background: var(--accent-gradient);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font-family);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.3);
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    font-family: var(--font-family);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #FFFFFF;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(108, 99, 255, 0.35);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.section-title {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.section-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 15px;
    margin-top: 14px;
    transition: var(--transition);
}

.view-all:hover {
    gap: 14px;
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.newsletter-section {
    padding: 70px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.newsletter-content {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #FFFFFF;
}

.newsletter-content h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.newsletter-content h2 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-content p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 60px;
    padding: 6px;
    overflow: hidden;
}

.newsletter-form input {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-family);
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-form .btn {
    padding: 12px 28px;
    border-radius: 50px;
    flex-shrink: 0;
}

.newsletter-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 14px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    font-size: 22px;
    margin-bottom: 12px;
    display: inline-flex;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 18px;
}

.social-links a:hover {
    background: var(--accent-gradient);
    color: #FFFFFF;
    transform: translateY(-3px);
    border-color: transparent;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links ul li,
.footer-contact ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--accent-primary);
    padding-left: 4px;
}

.footer-contact ul li {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact ul li i {
    color: var(--accent-primary);
    width: 20px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #FFFFFF;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: var(--z-tooltip);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 35px rgba(108, 99, 255, 0.4);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* ===== TABLETS ===== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 30px;
    }

    .newsletter-content h2 {
        font-size: 26px;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    /* ===== NAV ===== */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        transform: translateX(100%);
        transition: var(--transition);
        border-top: 1px solid var(--border-color);
        padding: 20px;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu a {
        font-size: 18px;
    }

    .hamburger {
        display: flex;
    }

    .btn-login .btn-text {
        display: none;
    }

    .btn-login {
        padding: 10px 14px;
    }

    /* ===== FOOTER ===== */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* ===== NEWSLETTER ===== */
    .newsletter-form {
        flex-direction: column;
        border-radius: var(--radius-md);
        background: transparent;
        border: none;
        padding: 0;
    }

    .newsletter-form input {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 14px 18px;
    }

    .newsletter-form .btn {
        border-radius: var(--radius-md);
        justify-content: center;
    }

    /* ===== SECTION ===== */
    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 15px;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    :root {
        --header-height: 64px;
    }

    .logo {
        font-size: 20px;
    }

    .logo i {
        font-size: 22px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .section-title {
        font-size: 22px;
    }

    .newsletter-content h2 {
        font-size: 22px;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

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

.mt-1 {
    margin-top: 8px;
}
.mt-2 {
    margin-top: 16px;
}
.mt-3 {
    margin-top: 24px;
}
.mt-4 {
    margin-top: 32px;
}
.mt-5 {
    margin-top: 48px;
}

.mb-1 {
    margin-bottom: 8px;
}
.mb-2 {
    margin-bottom: 16px;
}
.mb-3 {
    margin-bottom: 24px;
}
.mb-4 {
    margin-bottom: 32px;
}
.mb-5 {
    margin-bottom: 48px;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--accent-primary);
    color: #FFFFFF;
    border-radius: var(--radius-sm);
    z-index: var(--z-modal);
    font-weight: 600;
}

.skip-link:focus {
    top: 10px;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    header,
    footer,
    .back-to-top,
    .newsletter-section {
        display: none !important;
    }

    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 20px !important;
    }
}