/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
    min-height: 100vh;
}

.icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.icon-small {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Landing Page Styles */
.landing-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.landing-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.landing-icon {
    width: 80px;
    height: 80px;
    background: #000000;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-icon .icon {
    width: 40px;
    height: 40px;
    stroke: white;
}

.landing-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.table-info {
    color: #6b7280;
    font-size: 18px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.qr-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 16px;
    border: 3px dashed #000000;
}

.qr-icon svg {
    width: 100%;
    height: 100%;
    stroke: #000000;
}

.landing-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 30px;
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 20px;
}

/* Header Styles */
.header {
    background:#000000;
    color: white;
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 768px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header-title {
    font-size: 24px;
    font-weight: bold;
}

.header-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.cart-button, .back-button {
    position: relative;
    background: white;
    color: #000000;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.cart-button:hover, .back-button:hover {
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Bar */
.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: #9ca3af;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    outline: none;
}

/* Categories */
.categories-container {
    padding: 16px;
    overflow-x: auto;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.categories-list {
    display: inline-flex;
    gap: 8px;
}

.category-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-btn.active {
    background: #000000;
    color: white;
}

.category-btn:not(.active) {
    background: #f3f4f6;
    color: #4b5563;
}

.category-btn:not(.active):hover {
    background: #e5e7eb;
}

/* Menu Grid */
.menu-container {
    padding: 16px;
    max-width: 768px;
    margin: 0 auto;
    padding-bottom: 80px;
}


.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #000000;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Menu Item Card */
.menu-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.menu-item-image {
    height: 128px;
    background: linear-gradient(135deg, #b2dfdb 0%, #80cbc4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-item-content {
    padding: 12px;
}

.menu-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star {
    fill: #fbbf24;
    stroke: #fbbf24;
}

.menu-item-price {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}


.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 600px;
    padding: 24px;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.modal-image {
    height: 200px;
    background: linear-gradient(135deg, #b2dfdb 0%, #80cbc4 100%);
    border-radius: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-emoji {
    font-size: 72px;
}

.modal-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.modal-description {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
}

.modal-info {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.modal-price {
    font-size: 28px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 20px;
}

/* Cart Page Styles */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.empty-icon {
    width: 96px;
    height: 96px;
    stroke: #d1d5db;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 20px;
}

.cart-items-container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 200px;
}

.cart-item {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-item-top {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #b2dfdb 0%, #80cbc4 100%);
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
}

.quantity-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #e5e7eb;
}

.quantity-value {
    padding: 0 16px;
    font-weight: 600;
}

.item-total {
    font-size: 18px;
    font-weight: bold;
}

/* Cart Footer */
.cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 16px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.cart-summary {
    max-width: 600px;
    margin: 0 auto 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 16px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 12px;
}

.payment-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

/* Checkout Styles */
.checkout-container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.checkout-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

.order-summary {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-totals {
    padding-top: 12px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:has(input:checked) {
    border-color: #000000;
    background: #f0fdfa;
}

.payment-option input {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.payment-label {
    font-size: 16px;
}

/* Payment Gateway Modal Styles */
.payment-gateway-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.payment-gateway-modal.active {
    display: flex;
}

.payment-gateway-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;

    display: flex;
    flex-direction: column;
}

.payment-gateway-header {
    text-align: center;
    margin-bottom: 30px;
}

.payment-gateway-header h2 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 10px;
}

.payment-gateway-header p {
    color: #6b7280;
    font-size: 16px;
}

.payment-gateway-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}


.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.payment-method-option {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-method-option:hover {
    border-color: #2D7A7C;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(45, 122, 124, 0.2);
}

.payment-method-option.selected {
    border-color: #2D7A7C;
    background: #f0fdf4;
}


.payment-method-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.payment-gateway-buttons {            
    gap: 15px;

    margin-top: auto;
    padding: 20px 0 0;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.payment-gateway-buttons button {
    flex: 1;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.payment-gateway-buttons.show {
    display: flex;
    gap: 15px;
}

.gateway-cancel-btn {
    background: #f3f4f6;
    color: #374151;
}

.gateway-pay-btn {
    background: linear-gradient(135deg, #2D7A7C, #1f5456);
    color: white;
}

.gateway-pay-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}


/* =====================================================
   SUCCESS OVERLAY WITH ANIMATIONS
   ===================================================== */

.success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-overlay.active {
    opacity: 1;
}

.success-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    animation: slideUpFade 0.5s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkmark Animation */
.checkmark-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.checkmark {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #10b981;
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 #10b981;
    animation: fill 0.4s ease-in-out 0.4s forwards,
               scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle-path {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #fff;
    stroke-width: 3;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0 0 0 60px #10b981;
    }
}

/* Success Text Styling */
.success-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.success-message {
    font-size: 1.3rem;
    color: #10b981;
    margin-bottom: 2rem;
    font-weight: 600;
}

.order-id-box {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.order-id-label {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.order-id-value {
    font-size: 1.5rem;
    color: #10b981;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.success-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.receipt-link {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.receipt-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.back-menu-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.back-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 10000;
    pointer-events: none;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .success-content {
        padding: 1.5rem;
    }
    
    .checkmark-circle {
        width: 100px;
        height: 100px;
    }
    
    .checkmark {
        width: 100px;
        height: 100px;
    }
    
    .success-title {
        font-size: 1.5rem;
    }
    
    .order-id-value {
        font-size: 1.2rem;
    }
}

/* Buttons */
.btn-primary, .btn-secondary {
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #000000;
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: #236062;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 640px) {
    .landing-card {
        padding: 30px 20px;
    }
    
    .menu-grid {
        gap: 12px;
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* =====================================================
   PAYMENT GATEWAY FORM STYLES
   ===================================================== */

.payment-step {
    display: none;
}

.payment-step.active {
    display: block;
}

.back-to-methods {
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.back-to-methods:hover {
    background: #e5e7eb;
}

.payment-gateway-header {
    position: relative;
}

.payment-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2D7A7C;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.auth-simulation {
    text-align: center;
    padding: 40px 20px;
}

.fingerprint-icon {
    margin-bottom: 15px;
    color: #2D7A7C;
}

.qr-code-display {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.payment-method-icon {
    margin-bottom: 10px;
    color: #374151;
}

