/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Dark Colors */
    --dark-1: #000000;
    --dark-2: #7184ee;
    --dark-3: #2a2f4a;

    /* Light Colors */
    --light-1: #ffffff;
    --light-2: #f5f7fa;
    --light-3: #e8ecf0;

    /* Blue Colors */
    --blue-1: #3b82f6;
    --blue-2: #2563eb;
    --blue-3: #606472;
    --blue-4: #000000;
    --blue-light: #60a5fa;
    --blue-dark: #ffffff;

    /* Spacing */
    --margin-top: 20px;
    --margin-right: 20px;
    --margin-bottom: 20px;
    --margin-left: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--dark-1) 0%, var(--dark-2) 50%, var(--blue-dark) 100%);
    color: var(--light-2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    min-height: 100vh;
    padding: var(--margin-top) var(--margin-right) var(--margin-bottom) var(--margin-left);
}

/* ============================================
   Layout Components
   ============================================ */
.main-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.95), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    min-height: calc(100vh - var(--margin-top) - var(--margin-bottom) - 80px);
    padding: 40px;
    position: relative;
}

.page-content {
    color: var(--light-2);
    padding: 30px 20px;
}

/* ============================================
   Page Components
   ============================================ */
.page {
    display: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.content-card {
    animation: slideUp 0.6s ease;
    backdrop-filter: blur(10px);
    background: rgba(26, 31, 58, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
    padding: clamp(20px, 4vw, 32px);
}

/* ============================================
   Typography
   ============================================ */
h1 {
    color: var(--light-1);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

p {
    color: var(--light-3);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    opacity: 0.9;
    text-align: center;
}

/* ============================================
   Demo Element
   ============================================ */
#demo {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    color: var(--light-1);
    font: bold;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: clamp(18px, 3vw, 25px);
    margin-inline: auto;
    max-width: min(100%, 420px);
    padding: 8px 20px;
    transition: all 0.25s ease-in-out;
    width: fit-content;
}

#demo:hover {
    background: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
    backdrop-filter: blur(26px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
        radial-gradient(circle at 0 0, rgba(113, 132, 238, 0.45), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(96, 100, 114, 0.4), transparent 55%);
    border-radius: 999px;
    bottom: 20px;
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);
    display: flex;
    gap: 4px;
    justify-content: space-around;
    left: 50%;
    max-width: 520px;
    overflow: hidden;
    padding: 10px 16px;
    position: fixed;
    transform: translateX(-50%);
    width: min(92vw, 520px);
    z-index: 1000;
}

.nav-glass-morph {
    backdrop-filter: blur(20px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15)),
        radial-gradient(circle at 30% 30%, rgba(113, 132, 238, 0.5), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(96, 165, 250, 0.4), transparent 60%);
    border-radius: 999px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.15);
    height: calc(100% - 8px);
    left: 0;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    width: 0;
    z-index: 0;
}

.nav-glass-morph.visible {
    opacity: 1;
}

.nav-item {
    align-items: center;
    border-radius: 999px;
    color: var(--light-3);
    display: flex;
    flex-direction: column;
    font-size: clamp(9px, 1.8vw, 11px);
    gap: 4px;
    padding: 8px 14px;
    position: relative;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.nav-item i {
    color: inherit;
    font-size: clamp(18px, 4vw, 20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.nav-item span {
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--blue-light);
    transform: translateY(-2px) translateZ(0);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    color: var(--light-1);
    transform: translateY(-2px) translateZ(0);
}

.nav-item.active i {
    color: var(--light-1);
    transform: scale(1.15);
}

.nav-item.active span {
    color: var(--light-1);
    font-weight: 600;
}

.nav-item.active::before,
.nav-item.active::after {
    display: none;
}

/* ============================================
   Social Panel
   ============================================ */
.social-panel {
    align-items: center;
    display: flex;
    gap: 12px;
    left: 30px;
    position: absolute;
    top: 40px;
    z-index: 1100;
}

.social-toggle {
    align-items: center;
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    border: none;
    border-radius: 999px;
    border-top-left-radius: 999px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    color: var(--light-1);
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    letter-spacing: 0.05em;
    padding: 12px 20px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.social-toggle:hover {
    background: linear-gradient(135deg, var(--blue-2), var(--blue-3));
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.social-panel.open .social-toggle {
    transform: translateX(8px);
}

.social-toggle:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 4px;
}

.toggle-icon {
    display: inline-flex;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.social-panel.open .toggle-icon {
    transform: rotate(45deg);
}

.social-links {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 999px;
    display: flex;
    gap: 10px;
    opacity: 0;
    padding: 8px 14px;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.social-panel.open .social-links {
    opacity: 1;
    pointer-events: auto;
    transform: scaleX(1);
}

.social-links a,
.social-link {
    align-items: center;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    color: var(--light-1);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    transition: all 0.3s ease;
    width: 40px;
    opacity: 0;
    transform: translateY(10px);
}

.social-panel.open .social-links a {
    opacity: 1;
    transform: translateY(0);
}

.social-links a:nth-child(1) {
    transition-delay: 0.05s;
}

.social-links a:nth-child(2) {
    transition-delay: 0.1s;
}

.social-links a:nth-child(3) {
    transition-delay: 0.15s;
}

.social-links a:nth-child(4) {
    transition-delay: 0.2s;
}

.social-links a:nth-child(5) {
    transition-delay: 0.25s;
}

.social-links a:hover,
.social-link:hover {
    background: rgba(59, 130, 246, 0.35);
    transform: translateY(-4px) scale(1.1);
}

.social-link img,
.social-link svg {
    display: block;
    height: 22px;
    width: 22px;
}

.social-link.instagram {
    background: radial-gradient(circle at 30% 30%, #fdf497, #fdf497 30%, #fd5949, #d6249f, #285aeb);
}

.social-link.twitter {
    background: linear-gradient(135deg, #14171a, #000);
}

.social-link.linkedin {
    background: #0a66c2;
}

.social-link.github {
    background: #24292f;
}

.social-link.discord {
    background: #5865f2;
}

/* ============================================
   Button Styles
   ============================================ */
#ip {
    background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
    border: 2px solid transparent;
    border-radius: 100px 50px;
    box-shadow: var(--shadow-lg);
    color: var(--light-1);
    cursor: pointer;
    display: inline-flex;
    font: bold;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    letter-spacing: 0.05em;
    margin-inline: auto;
    margin-left: 30px;
    margin-top: 20px;
    max-width: min(100%, 400px);
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
}

#ip:hover {
    background: linear-gradient(135deg, var(--blue-2), var(--blue-3));
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

#ip:active {
    box-shadow: var(--shadow-md);
    transform: translate(2px, 2px);
}

/* ============================================
   Animations
   ============================================ */
@keyframes bounce {
    0%,
    20%,
    60%,
    100% {
        transform: translateY(-5px);
    }

    40% {
        transform: translateY(-8px);
    }

    80% {
        transform: translateY(-6px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        opacity: 0.3;
    }

    to {
        opacity: 0.6;
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1.2);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Media Queries - Tablet
   ============================================ */
@media (max-width: 768px) {
    :root {
        --margin-top: 15px;
        --margin-right: 15px;
        --margin-bottom: 15px;
        --margin-left: 15px;
    }

    .main-card {
        border-radius: 20px;
        padding: 30px;
    }

    .page-content {
        padding: 20px 15px;
    }

    .content-card {
        padding: 24px;
    }

    .bottom-nav {
        max-width: 450px;
        padding: 10px 16px;
    }

    .social-panel {
        left: 20px;
        top: 30px;
    }

    .social-toggle {
        padding: 10px 18px;
    }

    #ip {
        margin-left: 20px;
        margin-top: 15px;
    }
}

/* ============================================
   Media Queries - Mobile
   ============================================ */
@media (max-width: 480px) {
    :root {
        --margin-top: 10px;
        --margin-right: 10px;
        --margin-bottom: 10px;
        --margin-left: 10px;
    }

    body {
        padding: var(--margin-top) var(--margin-right) var(--margin-bottom) var(--margin-left);
    }

    .main-card {
        border-radius: 16px;
        min-height: calc(100vh - var(--margin-top) - var(--margin-bottom) - 60px);
        padding: 20px;
    }

    .page-content {
        padding: 15px 10px;
    }

    .content-card {
        border-radius: 16px;
        margin: 15px 0;
        padding: 20px;
    }

    .bottom-nav {
        bottom: 15px;
        max-width: 95%;
        padding: 10px 12px;
        width: 95%;
    }

    .nav-item {
        font-size: 9px;
        padding: 6px 8px;
    }

    .nav-item i {
        font-size: 18px;
    }

    .nav-item span {
        font-size: 8px;
    }

    .social-panel {
        flex-direction: column;
        gap: 8px;
        left: 15px;
        top: 15px;
    }

    .social-toggle {
        font-size: 11px;
        padding: 10px 16px;
    }

    .toggle-label {
        display: none;
    }

    .social-panel.open .social-toggle {
        transform: none;
    }

    .social-links {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
        transform-origin: top left;
    }

    .social-links a,
    .social-link {
        height: 36px;
        width: 36px;
    }

    .social-link img,
    .social-link svg {
        height: 20px;
        width: 20px;
    }

    #ip {
        font-size: 0.85rem;
        margin-left: 0;
        margin-top: 15px;
        padding: 10px 20px;
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================
   Media Queries - Small Mobile
   ============================================ */
@media (max-width: 360px) {
    .main-card {
        padding: 15px;
    }

    .page-content {
        padding: 10px 5px;
    }

    .content-card {
        padding: 15px;
    }

    .bottom-nav {
        padding: 8px 10px;
    }

    .nav-item {
        font-size: 8px;
        padding: 5px 6px;
    }

    .nav-item i {
        font-size: 16px;
    }

    .social-panel {
        left: 10px;
        top: 10px;
    }

    .social-toggle {
        padding: 8px 12px;
    }
}

/* ============================================
   Media Queries - Large Screen
   ============================================ */
@media (min-width: 1200px) {
    .main-card {
        max-width: 1400px;
        margin: 0 auto;
    }

    .bottom-nav {
        max-width: 600px;
    }
}
