@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&display=swap");

:root {
    --bg-color: #0b0b0b;
    --text-primary: #ffffff;
    --text-secondary: #888a91;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.15);
    --border-hover: rgba(255, 255, 255, 0.4);
    --accent: #ffffff;
    --accent-hover: #e0e0e0;
    --danger: #ef4444;
    --success: #10b981;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 28px;

    --transition: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:
        "Sora",
        -apple-system,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

::selection {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* =========================================================
   Endless Deep-Space Cosmic Background from Portfolio Trial
   ========================================================= */

@keyframes cosmicDrift {
    0% {
        background-position: 0px 0px;
    }
    100% {
        background-position: -500px 250px;
    }
}

@keyframes slowFade {
    0%,
    100% {
        opacity: 0.12;
    }
    50% {
        opacity: 0.18;
    }
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 250px 250px;
    background-repeat: repeat;
    opacity: 0.15;
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: screen;
    animation:
        cosmicDrift 20s linear infinite,
        slowFade 23s ease-in-out infinite;
}

.mysterious-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background: #010101;
}

@keyframes subtleBgShift {
    0% {
        background: linear-gradient(
            135deg,
            #0a0a0a 0%,
            #050505 50%,
            #080808 100%
        );
    }
    50% {
        background: linear-gradient(
            135deg,
            #080808 0%,
            #0a0a0a 50%,
            #060606 100%
        );
    }
    100% {
        background: linear-gradient(
            135deg,
            #090909 0%,
            #070707 50%,
            #0a0a0a 100%
        );
    }
}

/* Ambient Floating Scanlines */
@keyframes scanlineDrift {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 400px;
    }
}

.mysterious-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 6;
    pointer-events: none;
    animation: scanlineDrift 15s linear infinite;
}

/* Vignette Box Shadow */
.mysterious-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        transparent 20%,
        #000000 100%
    );
    pointer-events: none;
    z-index: 5;
}

.nebula {
    position: absolute;
    filter: blur(140px);
    opacity: 0.6;
    animation: drift 25s infinite alternate ease-in-out;
    border-radius: 50%;
    will-change: transform;
}

.nebula-1 {
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, #08041a 0%, transparent 60%);
    top: -30%;
    left: -20%;
    animation-duration: 35s;
}

.nebula-2 {
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, #01091a 0%, transparent 60%);
    bottom: -20%;
    right: -30%;
    animation-duration: 45s;
    animation-direction: alternate-reverse;
}

.nebula-3 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #110008 0%, transparent 60%);
    top: 30%;
    left: 30%;
    animation-duration: 55s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        transform: translate(15vw, -15vh) scale(1.2) rotate(15deg);
    }
}

/* =========================================================
   Network Directory Desktop Styles
   ========================================================= */
.user-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.01) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 28px 16px !important;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    will-change: transform, box-shadow, border-color;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

@media (hover: hover) {
    .user-card:hover {
        transform: translateY(-6px);
        border-color: rgba(255, 255, 255, 0.18) !important;
        box-shadow:
            0 25px 50px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    .user-card:hover::before {
        opacity: 1;
    }
}

/* =========================================================
   Subtle Mobile Background Animation
   ========================================================= */
@keyframes mobileBreathing {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}

@keyframes lightShift {
    0% {
        background-position: 50% 0%;
    }
    50% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 50% 0%;
    }
}

/* =========================================================
   Mobile Performance Optimization - Disable heavy effects
   ========================================================= */
@media (max-width: 768px) {
    /* CRITICAL: Disable heavy background animations on mobile */
    .noise-overlay {
        display: none !important;
    }

    .nebula,
    .nebula-1,
    .nebula-2,
    .nebula-3 {
        display: none !important;
    }

    .mysterious-bg::before {
        animation: none !important;
        background: none !important;
    }

    /* Use #080808 background with breathing and subtle scroll lighting for mobile */
    body {
        background-color: #080808 !important;
        animation: none !important;
    }

    .mysterious-bg {
        background: #080808 !important;
        animation: none !important;
    }

    /* Breathing effect */
    .mysterious-bg::before {
        content: "";
        position: fixed;
        top: 50%;
        left: 50%;
        width: 150vw;
        height: 150vw;
        margin-top: -75vw;
        margin-left: -75vw;
        background: radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.04) 0%,
            transparent 60%
        );
        animation: mobileBreathing 8s ease-in-out infinite !important;
        pointer-events: none;
        z-index: 1;
        display: block !important;
    }

    /* Swipe lighting effect */
    .mysterious-bg::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.015) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.015) 100%
        );
        background-size: 100% 200%;
        animation: lightShift 15s ease-in-out infinite !important;
        pointer-events: none;
        z-index: 2;
        display: block !important;
    }

    /* Improve glass cards on mobile */
    .glass-card {
        padding: 28px 20px !important;
        border-radius: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        background: linear-gradient(
            135deg,
            rgba(12, 12, 12, 0.9) 0%,
            rgba(8, 8, 8, 0.95) 100%
        ) !important;
        box-shadow:
            0 10px 30px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    /* Improve message cards on mobile */
    .message-card {
        padding: 24px !important;
        border-radius: 16px !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        background: linear-gradient(
            135deg,
            rgba(14, 14, 14, 0.85) 0%,
            rgba(10, 10, 10, 0.9) 100%
        ) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
    }

    /* Network Directory - 2 users per row on mobile */
    .network-directory-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    .user-card {
        padding: 20px 10px !important;
        background: linear-gradient(
            135deg,
            rgba(12, 12, 12, 0.85) 0%,
            rgba(8, 8, 8, 0.9) 100%
        ) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    .user-card img,
    .user-card div[style*="width: 64px"] {
        width: 56px !important;
        height: 56px !important;
        margin-bottom: 12px !important;
    }
    .user-card span[style*="font-size: 1rem"] {
        font-size: 0.95rem !important;
        margin-bottom: 6px !important;
    }
    .user-card span[style*="font-size: 0.75rem"] {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.03em;
}
p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Navigation - Premium Floating Glass Pill */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px 10px 24px;
    margin: 24px auto 0 auto;
    width: calc(100% - 48px);
    max-width: 1200px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    background: rgba(10, 10, 15, 0.5);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: sticky;
    top: 24px;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform, box-shadow;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 8px 12px;
    border-radius: 8px;
}
.logo:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 20;
}
.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
}
.nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}
.nav-item.active-nav {
    color: #ffd700;
    font-weight: 800;
    background-color: transparent;
    border: none;
    box-shadow: none;
}
.nav-item.active-nav::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    will-change: transform, box-shadow, background-color;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(200, 200, 200, 0.9) 100%
    );
    color: #000;
    border: none;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.2);
}
.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.1);
}
.btn-secondary:active {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

/* Main Layout */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    z-index: 20;
    position: relative;
}

/* Magic Glowing Hover Cards - Transparent Glassy Professional Look */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 48px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 20;
    will-change: border-color, box-shadow, transform;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.glass-card::before,
.message-card::before {
    display: none; /* Disabled glowing light effect for cleaner transparent look */
}
.glass-card:hover::before,
.message-card:hover::before {
    opacity: 1;
}

.hero {
    text-align: center;
    max-width: 800px;
    margin-bottom: 40px;
    position: relative;
    z-index: 20;
}
.hero h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-shadow:
        0 0 40px rgba(255, 255, 255, 0.15),
        0 0 20px rgba(255, 255, 255, 0.08);
    letter-spacing: -0.02em;
    font-weight: 900;
}
.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    letter-spacing: -0.01em;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-control {
    width: 100%;
    padding: 16px;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: border-color, box-shadow, background-color;
}
.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.3);
}
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}
textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: slideInDown 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.alert-error {
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.15) 0%,
        rgba(239, 68, 68, 0.08) 100%
    );
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.alert-success {
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.15) 0%,
        rgba(16, 185, 129, 0.08) 100%
    );
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.mobile-break {
    display: none;
}

/* Modal animations removed for performance - using opacity/transform only */

/* Profile Submission Page Specifics */
.profile-icon-wrap {
    width: 80px;
    height: 80px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(
        135deg,
        rgba(10, 10, 15, 0.6) 0%,
        rgba(8, 8, 12, 0.6) 100%
    );
    border-radius: 50%;
    margin: 0 auto 32px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}
.profile-title {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 900;
    letter-spacing: -0.02em;
}
.profile-title span {
    font-size: 1.8rem;
    display: block;
    margin-top: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #c0c0c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.profile-desc {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
}
.profile-input {
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    transition: all 0.3s ease;
}
.profile-textarea {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    font-size: 1.1rem;
    padding: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    min-height: 140px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Dashboard Specifics */
.dashboard-header {
    margin-bottom: 48px;
    text-align: left;
    width: 100%;
}
.dashboard-header h2 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* Install App Button Styling */
.installAppBtn {
    transition: all 0.3s ease !important;
    will-change: background-color, border-color, box-shadow;
}

.installAppBtn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

.installAppBtn:active {
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.share-link-box {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1.5px dashed rgba(255, 255, 255, 0.15);
    padding: 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 20px;
    width: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}
.share-link-box:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}
.share-link-box code {
    font-family: "Courier New", monospace;
    color: var(--text-primary);
    font-size: 1rem;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    font-weight: 500;
    letter-spacing: 0.5px;
}
.share-link-box code:hover {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.message-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    width: 100%;
}
.message-card {
    padding: 32px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.01) 100%
    );
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, border-color;
}

/* Specific Hover Effects ONLY for Desktop Mice */
@media (hover: hover) {
    .message-card:hover {
        transform: translateY(-6px);
        box-shadow:
            0 25px 50px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.15);
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0.02) 100%
        );
    }
    .locked-card:hover .reveal-btn {
        background: linear-gradient(
            135deg,
            #ffffff 0%,
            #e8e8e8 100%
        ) !important;
        color: #000 !important;
        border-color: #fff !important;
        box-shadow:
            0 0 20px rgba(255, 255, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
        transform: scale(1.05);
    }
    .locked-card:hover .lock-icon-wrap {
        background: linear-gradient(
            135deg,
            #ffffff 0%,
            #f0f0f0 100%
        ) !important;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2) !important;
    }
    .locked-card:hover .lock-icon-wrap i {
        transform: scale(1.15) rotate(-5deg);
        color: #000 !important;
    }
    .locked-card:hover .card-glow-bg {
        opacity: 1 !important;
    }
}

/* Mobile-Friendly Active/Tap State (Haptic Feel) */
@media (max-width: 768px) {
    .message-card:active {
        transform: scale(0.96);
        background: linear-gradient(
            135deg,
            rgba(16, 16, 16, 0.9) 0%,
            rgba(12, 12, 12, 0.95) 100%
        );
        box-shadow:
            0 6px 20px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .glass-card,
    .user-card {
        -webkit-tap-highlight-color: transparent;
    }

    button,
    .btn-primary,
    .btn-secondary {
        -webkit-user-select: none;
        user-select: none;
    }
}
.message-card .msg-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 24px;
    flex: 1;
}
.message-card .msg-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Interactive Modal - Optimized for Performance */
@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    will-change: opacity;
}
.dashboard-modal.active {
    opacity: 1;
    pointer-events: all;
}
.dashboard-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.dashboard-modal-content {
    position: relative;
    max-width: 500px;
    width: 92%;
    transform: translateY(30px);
    opacity: 0;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 48px;
    z-index: 1001;
    background: rgba(12, 12, 14, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    will-change: transform, opacity;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.dashboard-modal.active .dashboard-modal-content {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .dashboard-modal-backdrop {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        background: rgba(0, 0, 0, 0.65);
    }
    .dashboard-modal-content {
        padding: 32px 20px !important;
        border-radius: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow:
            0 15px 50px rgba(0, 0, 0, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    }
    /* Modal content improvements on mobile */
    .dashboard-modal-content button[id="closeModal"] {
        top: 16px !important;
        right: 20px !important;
        font-size: 1.4rem !important;
        padding: 8px !important;
    }
    .dashboard-modal-content p[id="modalSender"] {
        font-size: 1.1rem !important;
    }
    .dashboard-modal-content p[id="modalDate"] {
        font-size: 0.8rem !important;
    }
    .dashboard-modal-content div[style*="font-size: 1.15rem"] {
        font-size: 1rem !important;
        max-height: 300px !important;
    }
    .dashboard-modal-content button[id="downloadStoryBtn"] {
        font-size: 1.4rem !important;
        padding: 12px !important;
    }
}
#closeModal:hover {
    color: var(--text-primary) !important;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 15, 0.6) 0%,
        rgba(8, 8, 12, 0.6) 100%
    );
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.admin-table th,
.admin-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}
.admin-table th {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}
.admin-table tr:last-child td {
    border-bottom: none;
}
.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

footer {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1.5px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
    z-index: 20;
    position: relative;
    transition: all 0.3s ease;
}

footer:hover {
    color: var(--text-primary);
    border-top-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    nav {
        top: 16px;
        margin-top: 16px;
        width: calc(100% - 32px);
        padding: 8px 12px 8px 20px;
        border-radius: 50px;
    }
    .logo {
        font-size: 1.15rem;
    }
    .logo-text {
        display: none;
    }
    .nav-links {
        gap: 12px;
    }
    .hide-mobile {
        display: none !important;
    }
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    .nav-item {
        font-size: 0.85rem;
        padding: 8px 4px;
    }

    .hero h1 {
        font-size: 3rem;
    }
    .share-link-box {
        flex-direction: column;
        align-items: stretch;
        padding: 24px 16px;
    }
    .share-link-box .share-text-wrap {
        width: 100%;
        text-align: center;
    }
    .share-link-box code {
        font-size: 0.85rem;
        padding: 12px;
    }
    .share-actions {
        flex-direction: row;
        width: 100%;
    }
    .share-actions .share-btn {
        flex: 1;
    }
    .glass-card {
        padding: 32px 16px;
    }
    .dashboard-modal-content {
        padding: 32px 20px;
    }

    .mobile-break {
        display: block;
        height: 8px;
    }

    /* Profile page mobile fixes */
    .profile-icon-wrap {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
        font-size: 1.5rem;
    }
    .profile-title {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    .profile-title span {
        font-size: 1.4rem;
        margin-top: 4px;
    }
    .profile-desc {
        margin-bottom: 20px;
        font-size: 0.95rem;
    }
    .profile-input {
        padding: 14px;
        margin-bottom: 16px;
    }
    .profile-textarea {
        padding: 16px;
        font-size: 1rem;
        min-height: 120px;
    }

    /* Terms checkbox mobile improvements */
    .terms-checkbox-container {
        padding: 20px !important;
        gap: 16px !important;
    }
    .terms-checkbox-container label {
        font-size: 1rem !important;
    }
}

/* =========================================================
   FOUC Prevention - Prevents blue text flash on mobile refresh
   ========================================================= */
#main-content-scroll {
    opacity: 1;
}

/* Hide content until CSS is loaded to prevent FOUC on mobile */
@supports (animation: none) {
    #main-content-scroll {
        animation: fadeInContent 0.1s ease-out;
    }
}

@keyframes fadeInContent {
    from {
        opacity: 0.98;
    }
    to {
        opacity: 1;
    }
}

/* Nav instant render - prevent blue link flash */
nav,
nav a,
nav .nav-item,
nav .logo,
nav .btn-primary,
nav .btn-secondary {
    color: inherit;
    -webkit-text-fill-color: inherit;
}

/* =========================================================
   Admin Delete Buttons - Community Wall Moderation
   ========================================================= */
.admin-delete-btn {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.5;
}

.admin-delete-btn:hover {
    background: rgba(255, 107, 107, 0.25);
    border-color: rgba(255, 107, 107, 0.5);
    opacity: 1;
    transform: scale(1.1);
}

.admin-delete-comment-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 0.65rem;
    opacity: 0.3;
    padding: 2px 6px;
    margin-left: 6px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.admin-delete-comment-btn:hover {
    opacity: 1;
    background: rgba(255, 107, 107, 0.15);
}

/* =========================================================
   Global Toast Styling (bottom-center, premium)
   ========================================================= */
.ui-toast {
    border-radius: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   Success Toast Styling
   ========================================================= */
.ui-toast.success {
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.95) 0%,
        rgba(5, 150, 105, 0.95) 100%
    ) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
}

.ui-toast.success .toast-icon {
    color: #d1fae5 !important;
}
