/* Shared styles for Barely™ webstore */
:root {
    --cream: #faf8f3;
    --washed-black: #1a1a1a;
    --soft-black: #2a2a2a;
    --accent: #d4af37;
    --error: #ff6b6b;
    --success: #51cf66;
    --warning: #ffa726;
    --info: #42a5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--washed-black);
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--washed-black);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

.cursor-text {
    position: fixed;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--washed-black);
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Consistent across all pages */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 248, 243, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 20px 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}

.nav {
    display: flex;
    justify-content: center; /* center items horizontally */
    align-items: center;
    gap: 40px; /* spacing between logo and links */
    position: relative;
}

/* Use flex pseudo-elements to force the central group to sit in the middle */
.nav::before,
.nav::after {
    content: "";
    flex: 1 1 0px;
}

.logo {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto; /* don't grow/shrink */
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo .crown {
    width: 40px;
    height: 40px;
    margin-left: 12px;
    vertical-align: middle;
}

.logo .dot {
    position: absolute;
    top: -2px;
    right: -8px;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo .dot:hover {
    transform: scale(2);
    background: var(--error);
}

.nav-links {
    display: flex;
    gap: 28px;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto; /* don't grow/shrink */
}

/* Keep hamburger on the right edge so it's accessible on mobile */
.hamburger {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-links a {
    text-decoration: none;
    color: var(--washed-black);
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger Menu - Now on all pages */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--washed-black);
    margin: 5px 0;
    transition: 0.3s;
}

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

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

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

/* Error Notifications */
.error-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.error-notification {
    background: var(--cream);
    border: 2px solid var(--error);
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.1);
    animation: slideIn 0.3s ease;
}

.error-notification.success {
    border-color: var(--success);
}

.error-notification.warning {
    border-color: var(--warning);
}

.error-notification.info {
    border-color: var(--info);
}

.error-content {
    padding: 15px 20px;
    position: relative;
}

.error-content h4 {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--washed-black);
}

.error-content p {
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.8;
}

.error-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--washed-black);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.error-close:hover {
    opacity: 1;
}

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

/* Buttons */
.btn {
    background: var(--washed-black);
    color: var(--cream);
    border: none;
    padding: 15px 30px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--accent);
    color: var(--washed-black);
}

.btn-secondary {
    background: transparent;
    color: var(--washed-black);
    border: 2px solid var(--washed-black);
}

.btn-secondary:hover {
    background: var(--washed-black);
    color: var(--cream);
}

/* Loading States */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 248, 243, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    font-family: 'Space Mono', monospace;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cream);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(250, 248, 243, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 1000;
        width: 100vw;
        height: 100vh;
    }

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

    .nav-links a {
        font-size: 1.2rem;
        padding: 15px 0;
        min-width: 120px;
        text-align: center;
    }

    .hamburger {
        display: block;
    }

    .logo {
        font-size: 18px;
    }

    .logo .crown {
        width: 28px;
        height: 28px;
    }

    .logo .dot {
        top: -1px;
        right: -6px;
        width: 3px;
        height: 3px;
    }

    /* Hide custom cursor on mobile */
    .custom-cursor, .cursor-text {
        display: none;
    }

    body {
        cursor: auto;
    }

    .error-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .error-notification {
        margin-bottom: 5px;
    }
}

/* Page Load Animation */
.page-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

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