/* ============================================
   PIZZA 67 - MODERN MEME STYLE
   ============================================ */

#statusMeme {
    transition: opacity 0.3s ease-in-out;
}

:root {
    /* Colors - Vibrant & Modern */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: rgba(20, 20, 20, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --accent: #00ff88;
    --accent-hover: #00cc6a;
    --accent-orange: #ff5500;
    --accent-orange-hover: #ff3300;
    --accent-purple: #bd00ff;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --border-color: rgba(255, 255, 255, 0.15);
    --success: #00ff88;
    --warning: #ffcc00;
    --danger: #ff3333;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.8);

    /* Typography */
    --font-main: 'Outfit', -apple-system, sans-serif;

    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 85, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(189, 0, 255, 0.1) 0%, transparent 20%);
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    /* Bolder */
    background: linear-gradient(90deg, #ff00cc, #3333ff, #00ffcc, #ffcc00);
    background-size: 300% 100%;
    animation: rainbow 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* ============================================
   HERO SECTION (Customer Panel)
   ============================================ */

.hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: radial-gradient(ellipse at center top, rgba(255, 128, 0, 0.1) 0%, transparent 50%);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================
   ORDER FORM
   ============================================ */

.order-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 128, 0, 0.1);
}

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

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   PIZZA SELECTION
   ============================================ */

.pizza-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.pizza-option {
    position: relative;
    cursor: pointer;
}

.pizza-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pizza-card {
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.pizza-option input:checked+.pizza-card {
    border-color: var(--accent-orange);
    background: rgba(255, 128, 0, 0.1);
}

.pizza-option:hover .pizza-card {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pizza-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: block;
}

.pizza-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.pizza-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Custom ingredients section */
.custom-ingredients {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: none;
}

.custom-ingredients.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ff5500 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 128, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 128, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

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

/* ============================================
   ORDER STATUS CARD
   ============================================ */

.order-status {
    display: none;
    margin-top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.order-status.visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.status-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.status-message {
    color: var(--text-secondary);
}

.order-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-detail-label {
    color: var(--text-secondary);
}

.order-detail-value {
    font-weight: 500;
}

/* ============================================
   PIZZAMAN PANEL
   ============================================ */

.pizzaman-header {
    padding: 6rem 2rem 2rem;
    text-align: center;
}

.pizzaman-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pizzaman-header p {
    color: var(--text-secondary);
}

.orders-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .orders-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .orders-grid {
        grid-template-columns: 1fr;
    }
}

.orders-column {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.column-header {
    padding: 1rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.column-header.new {
    background: linear-gradient(135deg, rgba(255, 128, 0, 0.2) 0%, transparent 100%);
}

.column-header.in-progress {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.2) 0%, transparent 100%);
}

.column-header.done {
    background: linear-gradient(135deg, rgba(6, 193, 103, 0.2) 0%, transparent 100%);
}

.column-count {
    background: var(--bg-glass);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: auto;
}

.orders-list {
    padding: 1rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.order-id {
    font-weight: 700;
    color: var(--accent-orange);
}

.order-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-customer {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.order-pizza {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.order-pizza-emoji {
    font-size: 1.5rem;
}

.order-notes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--accent-hover);
}

.btn-warning {
    background: var(--warning);
    color: #000;
}

.btn-warning:hover {
    background: #e6a600;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #e63e3e;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state-emoji {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease;
    backdrop-filter: blur(10px);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.leaving {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============================================
   CONNECTION STATUS
   ============================================ */

.connection-status {
    position: fixed;
    top: 5rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.status-dot.connected {
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

@media (max-width: 640px) {
    .header {
        padding: 1rem;
    }

    .hero {
        padding: 6rem 1rem 2rem;
    }

    .container {
        padding: 1rem;
    }

    .order-form {
        padding: 1.5rem;
    }

    .pizza-options {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   LOGIN OVERLAY (Pizzaman Panel)
   ============================================ */

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-overlay.hidden {
    display: none;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.login-card .form-input {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.login-error {
    color: var(--danger);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

.main-content {
    display: none;
}

.main-content.visible {
    display: block;
}

/* ============================================
   MY ORDERS SIDEBAR (Customer Panel)
   ============================================ */

.my-orders-sidebar {
    position: fixed;
    top: 6rem;
    right: 1.5rem;
    width: 320px;
    max-height: calc(100vh - 8rem);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    z-index: 50;
    display: none;
    overflow: hidden;
}

.my-orders-sidebar.visible {
    display: block;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-glass);
}

.sidebar-count {
    margin-left: auto;
    background: var(--accent-orange);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.sidebar-orders {
    max-height: calc(100vh - 14rem);
    overflow-y: auto;
    padding: 0.75rem;
}

.sidebar-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.sidebar-order {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.sidebar-order:last-child {
    margin-bottom: 0;
}

.sidebar-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sidebar-order-id {
    font-weight: 600;
    color: var(--accent-orange);
    font-size: 0.9rem;
}

.sidebar-order-pizza {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-order-pizza-emoji {
    font-size: 1.5rem;
}

.sidebar-order-pizza-name {
    font-weight: 500;
}

.sidebar-order-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar-order-status.new {
    background: rgba(255, 128, 0, 0.15);
    color: var(--accent-orange);
}

.sidebar-order-status.in-progress {
    background: rgba(255, 184, 0, 0.15);
    color: var(--warning);
}

.sidebar-order-status.done {
    background: rgba(6, 193, 103, 0.15);
    color: var(--success);
}

@media (max-width: 900px) {
    .my-orders-sidebar {
        width: 280px;
        right: 1rem;
    }
}

@media (max-width: 640px) {
    .my-orders-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-height: 50vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
}

#statusMeme {
    transition: opacity 0.3s ease-in-out;
}