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

:root {
    --primary: #7C3AED;
    --primary-hover: #1d4ed8;
    --secondary: #10b981;
    --secondary-hover: #059669;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-blur: 12px;
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)),
        url('assets/bg.jpg') center/cover no-repeat;
    z-index: -1;
    filter: brightness(0.8);
}

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 1.5rem;
    /* Space at the very top */
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.logo-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.logo-svg-wrapper {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInDown 0.8s ease-out;
}

.main-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop_shadow(0 0 15px rgba(16, 185, 129, 0.4));
}

.star {
    animation: twinkle 2s infinite ease-in-out;
    transform-origin: center;
}

.star-1 {
    animation-delay: 0s;
    transform: scale(1.2);
}

.star-2 {
    animation-delay: 0.3s;
    transform: scale(1);
}

.star-3 {
    animation-delay: 0.6s;
    transform: scale(1.1);
}

.star-4 {
    animation-delay: 0.9s;
    transform: scale(0.8);
}

.star-5 {
    animation-delay: 1.2s;
    transform: scale(0.9);
}

.star-6 {
    animation-delay: 1.5s;
    transform: scale(1.3);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
        filter: brightness(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3) rotate(20deg);
        filter: brightness(1.5);
    }
}

.logo-text {
    font-size: 4rem;
    font-weight: 800;
    margin-top: -1rem;
    background: linear-gradient(135deg, #10b981 0%, #7C3AED 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    filter: drop-shadow(0 0 30px rgba(124, 58, 237, 0.2));
}

@media (max-width: 768px) {
    .logo-svg-wrapper {
        width: 150px;
        height: 150px;
    }

    .logo-text {
        font-size: 2.8rem;
    }
}

/* Form Styles */
.no-hover:hover {
    transform: none !important;
    border-color: var(--card-border) !important;
    background: var(--card-bg) !important;
}

.form-group {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Compact Customer Section Redesign */
.customer-section {
    max-width: 900px;
    margin: 0 auto 3.5rem auto;
}

.compact-form {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--glass-blur));
}

.col-3 {
    grid-column: span 3;
}

.col-2 {
    grid-column: span 2;
}

.col-6 {
    grid-column: span 6;
}

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

    .col-3,
    .col-2 {
        grid-column: span 1;
    }

    .col-6 {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .compact-form {
        grid-template-columns: 1fr;
    }

    .col-3,
    .col-2,
    .col-6 {
        grid-column: span 1;
    }
}

.compact-field {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.compact-field label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--secondary);
    margin-bottom: 0.2rem;
    margin-left: 0.5rem;
    font-weight: 700;
}

.compact-field input {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 12px !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    color: white !important;
    width: 100%;
    transition: var(--transition-fast);
}

.compact-field input:focus {
    border-color: var(--secondary) !important;
    outline: none;
    background: rgba(0, 0, 0, 0.3) !important;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.85rem;
    color: var(--text-main);
    width: 100%;
    outline: none;
    transition: var(--transition-fast);
}

input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Admin Bar Styles */
.admin-bar {
    position: fixed;
    top: -100px;
    /* Hidden initially */
    left: 0;
    width: 100%;
    background: #1e1b4b;
    border-bottom: 2px solid var(--secondary);
    z-index: 2000;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.admin-active .container {
    padding-top: 10rem !important;
}

.admin-bar.active {
    top: 0;
}

.admin-bar-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-info {
    display: flex;
    flex-direction: column;
}

.admin-info strong {
    color: var(--secondary);
    font-size: 1rem;
}

.admin-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

@media (max-width: 600px) {
    .admin-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .admin-actions {
        width: 100%;
    }

    .admin-actions button {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

.modal-content {
    background: #1e1b4b;
    border: 1px solid var(--card-border);
    border-radius: 32px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.check-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 2rem;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

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

#ticket-summary {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Print Styles */
@media print {
    body::before {
        display: none;
    }

    .main-grid {
        display: block;
    }

    aside,
    .calculator-content section:nth-child(1),
    #book-btn,
    #print-btn {
        display: none;
    }

    .calculator-content section:nth-child(2),
    .calculator-content section:nth-child(3) {
        margin-bottom: 2rem;
    }

    .item-card {
        border: 1px solid #ccc;
        color: black;
        background: white;
    }

    .container {
        color: black;
    }
}

header p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Layout - Mobile First */
.main-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 5rem 1rem 3rem 1rem;
    /* More space at the top for title visibility */
}

header h1 {
    font-size: 2.2rem;
    /* Scaled down for mobile */
}

/* Section Cards - Full Width */
.card-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Item Card - More compact for mobile */
.item-card {
    padding: 1.25rem;
    gap: 0.75rem;
}

.inputs-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem !important;
}

/* Summary Card - Flow naturally at the bottom for Mobile */
aside {
    position: static;
    width: 100%;
    margin-top: 2rem;
}

.summary-card {
    position: relative;
    top: 0;
    border-radius: 24px;
    padding: 1.5rem;
    margin: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--bg-dark), #1e1b4b);
    border: 1px solid var(--card-border);
}

.summary-title,
#summary-items {
    display: block;
    /* Show details even on mobile when scrolled down */
}

.total-display {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-amount {
    font-size: 2rem;
    margin: 0;
}

.btn-primary {
    margin-top: 0.75rem;
    padding: 1rem;
}

/* Desktop Overrides */
@media (min-width: 968px) {
    .container {
        max-width: 1100px;
        padding: 2rem 1rem;
    }

    .main-grid {
        display: grid;
        grid-template-columns: 1fr 400px;
        align-items: start;
    }

    aside {
        position: sticky;
        top: 2rem;
        width: auto;
        margin-top: 0;
    }

    .summary-card {
        border-radius: 24px;
        background: linear-gradient(135deg, var(--bg-dark), #1e1b4b);
    }

    .summary-title,
    #summary-items {
        display: block;
    }

    .total-display {
        display: block;
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--card-border);
    }

    .total-amount {
        font-size: 3rem;
        margin: 0.5rem 0;
    }

    .card-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.item-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.item-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.item-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Input Fields */
.input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

input[type="number"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem;
    color: var(--text-main);
    width: 100%;
    outline: none;
    transition: var(--transition-fast);
}

input[type="number"]:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Quantity Control */
.counter {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 12px;
}

.btn-icon {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Summary Card */
.summary-card {
    background: linear-gradient(135deg, var(--bg-dark), #1e1b4b);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    position: sticky;
    top: 2rem;
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.8s ease-out;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.total-display {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.total-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.total-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.5rem 0;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(to right, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 2rem;
    transition: var(--transition-fast);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.3);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Device Previewer Styles */
.preview-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.8);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
}

.preview-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.preview-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.preview-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
}

/* Device Simulator Overlay */
.device-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2500;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.device-overlay.active {
    display: flex;
}

.device-frame {
    background: #000;
    border: 12px solid #333;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.device-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bg-dark);
}

.device-mobile {
    width: 375px;
    height: 812px;
    border-radius: 50px;
}

.device-tablet {
    width: 900px;
    height: 1100px;
    border-radius: 30px;
}

.close-preview {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    color: black;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    z-index: 3100;
}