* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #031f25;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #42a5ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2d9cff;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 5vw;
    background: rgba(3, 31, 37, 0.95);
    border-bottom: 1px solid rgba(66, 165, 255, 0.15);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.brand {
    font-size: 22px;
    letter-spacing: -0.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand strong {
    color: #42a5ff;
}

.brand span:last-child {
    color: #8892a0;
    font-size: 13px;
    font-weight: 400;
}

.cloud {
    font-size: 22px;
}

.nav-btn {
    padding: 10px 20px;
    border: 1.5px solid #42a5ff;
    color: #42a5ff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    white-space: nowrap;
    background: transparent;
    font-family: inherit;
}

.nav-btn:hover {
    background: #42a5ff;
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px 0;
    width: 100%;
    max-width: 100%;
    -webkit-flex: 1;
    -webkit-flex-direction: column;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(36, 151, 255, 0.12), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(107, 188, 255, 0.08), transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(36, 151, 255, 0.05), transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(36, 151, 255, 0.08), transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 850px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #6bb4ff;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: rgba(42, 165, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(66, 165, 255, 0.2);
}

.blue {
    background: linear-gradient(135deg, #42a5ff, #2d9cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 {
    font-size: clamp(44px, 8vw, 72px);
    line-height: 1.1;
    margin: 20px 0 28px;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.lead {
    font-size: 18px;
    color: #d8e8f4;
    line-height: 1.7;
    margin-bottom: 50px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 60px 0;
}

.feature {
    padding: 32px 24px;
    border: 1px solid rgba(66, 165, 255, 0.15);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(7, 26, 48, 0.5), rgba(7, 26, 48, 0.3));
    backdrop-filter: blur(10px);
    transition: all 0.35s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

a.feature {
    cursor: pointer;
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(42, 165, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.feature:hover {
    background: linear-gradient(135deg, rgba(7, 26, 48, 0.8), rgba(7, 26, 48, 0.5));
    border-color: rgba(66, 165, 255, 0.35);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(36, 151, 255, 0.12);
}

.feature:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: inline-block;
    transition: transform 0.35s ease;
}

.feature:hover .feature-icon {
    transform: scale(1.15) rotateY(10deg);
}

.feature h3 {
    font-size: 17px;
    margin: 16px 0 10px;
    color: #e0e0e0;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.feature p {
    color: #b8cde4;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: rgba(7, 26, 48, 0.6);
    border-top: 1px solid rgba(66, 165, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 24px 24px;
    text-align: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding-left: 140px;
    min-height: 90px;
    z-index: 1;
}

.footer-build {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    font-size: 11px;
    color: #5a6f7f;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    white-space: nowrap;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 13px;
    color: #42a5ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #2d9cff;
    text-decoration: underline;
}

.footer-separator {
    color: #7a8fa1;
    font-size: 13px;
}

.footer-copyright {
    font-size: 12px;
    color: #7a8fa1;
    margin: 0;
}

.footer-copyright-link {
    color: #42a5ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-copyright-link:hover {
    color: #2d9cff;
    text-decoration: underline;
}

/* Floating Bug Report Button */
.floating-bug-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    -webkit-box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    z-index: 999;
    font-size: 24px;
    padding: 0;
    -webkit-appearance: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

.floating-bug-button:hover {
    transform: scale(1.15) translateZ(0);
    -webkit-transform: scale(1.15) translateZ(0);
    box-shadow: 0 8px 28px rgba(76, 175, 80, 0.7);
    -webkit-box-shadow: 0 8px 28px rgba(76, 175, 80, 0.7);
}

.floating-bug-button:active {
    transform: scale(0.95) translateZ(0);
    -webkit-transform: scale(0.95) translateZ(0);
}

.bug-button-label {
    display: none;
    position: absolute;
    bottom: 70px;
    right: -10px;
    background: #0d1b2a;
    color: #4caf50;
    padding: 10px 14px;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1.5px solid #4caf50;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-transition: opacity 0.3s ease;
    pointer-events: none;
}

.floating-bug-button:hover .bug-button-label {
    display: block;
    opacity: 1;
}

/* Responsive - adjust for mobile */
@media (max-width: 1200px) {
    .floating-bug-button {
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
    }

    .bug-button-label {
        bottom: 70px;
    }
}

@media (max-width: 768px) {
    .floating-bug-button {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .bug-button-label {
        bottom: 65px;
        font-size: 11px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .floating-bug-button {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .bug-button-label {
        bottom: 60px;
        font-size: 10px;
        padding: 6px 10px;
        right: -5px;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 16px 5vw;
    }

    .hero-content {
        padding: 0 16px;
    }

    .hero h1 {
        font-size: clamp(36px, 7vw, 52px);
        margin: 16px 0 20px;
    }

    .lead {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 2px;
        padding: 6px 12px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 40px 0;
    }

    .feature {
        padding: 24px 20px;
    }

    .feature h3 {
        font-size: 16px;
    }

    .feature p {
        font-size: 12px;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        padding: 20px 5vw;
        gap: 12px;
    }

    .brand {
        font-size: 18px;
    }

    .brand span:last-child {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 30px 0;
    }

    .hero h1 {
        font-size: 32px;
        margin: 12px 0 16px;
    }

    .lead {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .feature-grid {
        gap: 12px;
        margin: 30px 0;
    }

    .feature {
        padding: 20px 16px;
    }

    .feature-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .feature h3 {
        font-size: 15px;
        margin: 12px 0 8px;
    }

    .feature p {
        font-size: 12px;
    }

    .footer {
        padding: 16px 4vw;
    }

    .footer-text {
        font-size: 12px;
    }

    .nav {
        padding: 14px 4vw;
    }

    .brand {
        font-size: 16px;
        gap: 4px;
    }

    .nav-btn {
        padding: 9px 16px;
        font-size: 12px;
    }
}

/* ===== Shared app components (auth, forms, listings) ===== */

.page-wrap {
    flex: 1;
    padding: 48px 7vw 80px;
}

.narrow-wrap {
    max-width: 480px;
    margin: 0 auto;
}

.wide-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.page-heading {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.page-subheading {
    color: #b8cde4;
    font-size: 14px;
    margin: 0 0 32px;
}

.auth-card {
    background: linear-gradient(135deg, rgba(7, 26, 48, 0.6), rgba(7, 26, 48, 0.35));
    border: 1px solid rgba(66, 165, 255, 0.15);
    border-radius: 16px;
    padding: 36px;
    backdrop-filter: blur(10px);
}

.field-group {
    margin-bottom: 18px;
}

.field-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #d8e8f4;
}

.field-group input,
.field-group textarea,
.field-group select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(3, 16, 31, 0.5);
    border: 1.5px solid rgba(66, 165, 255, 0.2);
    color: #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
    outline: none;
    border-color: #2497ff;
    box-shadow: 0 0 0 3px rgba(36, 151, 255, 0.15);
}

.field-group textarea {
    resize: vertical;
    min-height: 110px;
}

.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #8fa5b8;
}

.btn-block {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #2497ff, #42a5ff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(36, 151, 255, 0.25);
}

.btn-block:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block.outline {
    background: rgba(42, 151, 255, 0.08);
    border: 1.5px solid rgba(42, 151, 255, 0.4);
    color: #42a5ff;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 18px;
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.alert-error {
    background: rgba(244, 67, 54, 0.15);
    color: #ef5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.alert-info {
    background: rgba(66, 165, 255, 0.12);
    color: #2d9cff;
    border: 1px solid rgba(66, 165, 255, 0.25);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #8892a0;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.pending { background: rgba(255, 152, 0, 0.15); color: #ffb74d; }
.status-badge.approved { background: rgba(76, 175, 80, 0.15); color: #81c784; }
.status-badge.rejected { background: rgba(244, 67, 54, 0.15); color: #ef5350; }
.status-badge.sold { background: rgba(154, 176, 193, 0.2); color: #8892a0; }

/* Listing grid (browse page) */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.listing-card {
    background: linear-gradient(135deg, rgba(7, 26, 48, 0.6), rgba(7, 26, 48, 0.3));
    border: 1px solid rgba(66, 165, 255, 0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.listing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(66, 165, 255, 0.35);
    box-shadow: 0 16px 40px rgba(36, 151, 255, 0.12);
}

.listing-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: rgba(66, 165, 255, 0.06);
    display: block;
}

.listing-card-img.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.listing-card-body {
    padding: 16px;
}

.listing-card-price {
    font-size: 18px;
    font-weight: 800;
    color: #2d9cff;
    margin: 0 0 6px;
}

.listing-card-desc {
    font-size: 13px;
    color: #b8cde4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8fa5b8;
}

.my-listing-row {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(7, 26, 48, 0.5);
    border: 1px solid rgba(66, 165, 255, 0.15);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.my-listing-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(66, 165, 255, 0.08);
    flex-shrink: 0;
}

.my-listing-info {
    flex: 1;
    min-width: 180px;
}

.my-listing-info strong {
    display: block;
    margin-bottom: 2px;
}

.image-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.image-upload-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(66, 165, 255, 0.2);
}

.image-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 600px) {
    .auth-card {
        padding: 24px;
    }
    .page-wrap {
        padding: 32px 5vw 60px;
    }
}

/* ===== Listing detail view (shared: public gated view + admin preview) ===== */

.listing-detail {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 800px) {
    .listing-detail {
        grid-template-columns: 1fr;
    }
}

.listing-detail-gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(66, 165, 255, 0.06);
    border: 1px solid rgba(66, 165, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.listing-detail-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-detail-gallery-main.placeholder {
    font-size: 64px;
}

.listing-detail-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.listing-detail-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}

.listing-detail-thumbs img.active {
    border-color: #2497ff;
}

.listing-detail-price {
    font-size: 32px;
    font-weight: 800;
    color: #2d9cff;
    margin: 0 0 16px;
}

.listing-detail-meta {
    font-size: 13px;
    color: #8fa5b8;
    margin-bottom: 24px;
}

.listing-detail-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #d8e8f4;
    white-space: pre-wrap;
}

.listing-detail-back {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 13px;
}

.admin-preview-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #0d1b2a;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-preview-bar strong {
    font-size: 13px;
}

.admin-preview-bar .actions {
    display: flex;
    gap: 10px;
}

/* Language selector — individual rounded pills (matches club.ten9.cloud) */
.language-selector {
    display: flex;
    gap: 6px;
}

.lang-btn {
    padding: 9px 16px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lang-btn:hover {
    border-color: #c9ced4;
    color: #0d1b2a;
}

.lang-btn.active {
    background: #0d1b2a;
    color: #fff;
    border-color: #0d1b2a;
}

/* Login / Register CTA pills (matches club.ten9.cloud) */
.nav-btn-login {
    padding: 10px 22px;
    border: none;
    background: #eef0f2;
    color: #0d1b2a;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-btn-login:hover {
    background: #e2e5e8;
    color: #0d1b2a;
}

.nav-btn-register {
    padding: 10px 22px;
    border: none;
    background: linear-gradient(135deg, #f0bf5c, #e8ac35);
    color: #0d1b2a;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(232, 172, 53, 0.35);
}

.nav-btn-register:hover {
    background: linear-gradient(135deg, #f2c876, #eab54a);
    color: #0d1b2a;
    transform: translateY(-1px);
}
