/* ==========================================
   ONE PIECE BURGER - SHARED STYLESHEET
   Consistent design across all pages
   Performance optimized with minimal repaints
   ========================================== */

/* --- CSS VARIABLES --- */
:root {
    --primary-gold: #ffcc00;
    --primary-red: #d32f2f;
    --bg-dark: #1f1f1f;
    --bg-card: #2c2c2c;
    --text-light: #f5f5f5;
    --text-muted: #e0e0e0;
    --paper-color: #f4e4bcd3;
    --wood-brown: #3e2723;
    --wood-brown-light: #5d3a1a;
    --sky-blue: #4fc3f7;
    --transition: all 0.3s ease;
}

/* --- GLOBAL RESETS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: 'Pirata One', cursive;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* --- NAVBAR --- */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    position: static;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    height: 70px;
    line-height: 1;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-gold);
    color: var(--wood-brown);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    border: 2px solid var(--wood-brown);
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top:hover {
    background: var(--primary-red);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top.show {
    display: flex;
}

@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 6px 5%;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 4px 3%;
    }
}

.logo {
    font-size: 14px;
    letter-spacing: 0px;
    margin: 0;
    font-family: 'Pirata One', cursive;
    font-weight: bold;
    display: flex;
    gap: 4px;
    align-items: center;
    color: var(--primary-red);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .logo {
        font-size: 12px;
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 11px;
        gap: 2px;
    }
}

.logo span:nth-child(1) {
    color: var(--sky-blue);
}

.logo span:nth-child(2) {
    color: var(--primary-red);
}

.logo span:nth-child(3) {
    color: var(--primary-red);
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 6px;
    }
}

.nav-links a {
    color: white;
    font-size: 18px;
    font-weight: 500;
    position: relative;
    text-decoration: none;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-links a {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        font-size: 10px;
    }
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-gold);
}

/* --- BUTTONS --- */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--wood-brown);
    color: white;
    border: 2px solid var(--wood-brown);
}

.btn-primary:hover {
    background: var(--wood-brown-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: var(--primary-gold);
    color: var(--wood-brown);
    border: 2px solid var(--primary-gold);
}

.btn-secondary:hover {
    background: #ffb700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: var(--primary-red);
    color: white;
    border: 2px solid var(--primary-red);
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c41c1c;
}

.btn-order {
    background-color: var(--primary-gold);
    color: white;
    padding: 14px 35px;
    font-size: 1.2rem;
    border-radius: 5px;
    font-family: 'Pirata One', cursive;
    border: 2px solid var(--primary-gold);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
    transition: var(--transition);
}

.btn-order:hover {
    background-color: transparent;
    color: var(--primary-gold);
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.5);
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--wood-brown);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--wood-brown);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    background: white;
    color: var(--wood-brown);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: linear-gradient(145deg, var(--paper-color) 0%, #e8d4a4 100%);
    border: 3px solid var(--wood-brown);
    border-radius: 10px;
    padding: 40px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--wood-brown);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary-gold);
    transform: rotate(90deg);
}

/* --- MESSAGES --- */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}

.message.success {
    background: #4caf50;
    color: white;
    display: block;
}

.message.error {
    background: var(--primary-red);
    color: white;
    display: block;
}

/* --- CONTENT CONTAINER --- */
.content-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    text-align: center;
}

.section-title {
    font-family: 'Pirata One', cursive;
    font-size: 3rem;
    color: var(--primary-gold);
    margin-bottom: 40px;
    margin-top: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- GRID --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.menu-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 12px 15px 30px rgba(0, 0, 0, 0.4);
}

.menu-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
    filter: brightness(0.95);
}

.menu-card:hover img {
    filter: brightness(1.1) contrast(1.05);
}

/* --- FOOTER --- */
footer {
    background-color: #111;
    padding: 40px 20px;
    text-align: center;
    border-top: 3px solid var(--primary-gold);
    margin-top: 50px;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

footer h2 {
    color: white;
    font-family: 'Pirata One', cursive;
    margin-bottom: 20px;
}

footer p {
    margin: 10px 0;
    color: #888;
    font-size: 1rem;
}

footer strong {
    color: var(--primary-gold);
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- UTILITY CLASSES --- */
.hidden {
    display: none;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 12px 4%;
        flex-direction: column;
        gap: 12px;
    }

    .logo {
        font-size: 20px;
        height: auto;
        line-height: 1.2;
    }

    .nav-links {
        gap: 15px;
        width: 100%;
        justify-content: center;
    }

    .nav-links a {
        font-size: 15px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-box {
        width: 95%;
        padding: 25px 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .navbar {
        padding: 10px 3%;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* --- PERFORMANCE OPTIMIZATIONS --- */

/* Reduce motion for users with prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Will-change for high-performance animations */
.navbar {
    will-change: transform;
}

.menu-card {
    will-change: transform, box-shadow;
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
}

/* Optimize font loading */
body {
    font-display: swap;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-display: swap;
}