/* Custom CSS for cursor and new color palette */
body {
    font-family: 'Inter', sans-serif;
    background-color: #18181b; /* Zinc 900 */
    color: #e4e4e7; /* Zinc 200 */
    overflow-x: hidden;
}

/* --- Custom Scrollbar Styles --- */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(113, 113, 122, 0.5); /* zinc-500 with 50% opacity */
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(113, 113, 122, 0.7); /* More opaque on hover */
}
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(113, 113, 122, 0.5) transparent;
}

/* --- T.O.S Panel Scrollbar --- */
#tos-content-area::-webkit-scrollbar {
    width: 8px;
}
#tos-content-area::-webkit-scrollbar-thumb {
    background-color: rgba(113, 113, 122, 0.4);
}
#tos-content-area::-webkit-scrollbar-thumb:hover {
    background-color: rgba(113, 113, 122, 0.6);
}
#tos-content-area {
     scrollbar-width: thin;
     scrollbar-color: rgba(113, 113, 122, 0.4) transparent;
}


.card {
    background-color: #27272a; /* Zinc 800 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #3f3f46; /* Zinc 700 */
    cursor: pointer;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 30px 5px rgba(251, 191, 36, 0.2);
}
.btn-primary {
    background-color: #f59e0b; /* Amber 500 */
    color: #18181b; /* Dark text for contrast */
    transition: background-color 0.3s ease;
}
.btn-primary:hover {
    background-color: #d97706; /* Amber 600 */
}
.btn-primary:disabled {
    background-color: #a16207; /* Amber 700 */
    cursor: not-allowed;
    opacity: 0.6;
}
.fade-in {
    animation: fadeIn 1s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#custom-cursor {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}
#cursor-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid #f59e0b;
    box-shadow: 0 0 25px 5px rgba(251, 191, 36, 0.7);
    transition: transform 0.2s ease-in-out;
    transform: translate(-50%, -50%);
}
#custom-cursor.hover #cursor-circle {
    transform: translate(-50%, -50%) scale(1.5);
}

#hologram-canvas {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-color: #18181b;
    filter: blur(0.5px); 
}

body > *:not(#hologram-canvas):not(#custom-cursor):not(#cart-panel):not(#toast-container):not(#product-modal-panel):not(#quick-add-panel):not(#customer-panel):not(#auth-panel):not(#logout-confirm-panel):not(#tos-panel):not(#turnstile-overlay):not(#crop-modal) {
    position: relative;
    z-index: 1;
}

/* Logo Animation */
.logo-khan {
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.7));
    animation: pulse-glow 2s infinite alternate;
}
.logo-ware-container {
    margin-left: -8px;
}
.logo-ware-container span {
    display: inline-block;
    animation-name: wave-bounce;
    animation-duration: 3.5s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}
@keyframes pulse-glow {
    from { filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.7)); }
    to { filter: drop-shadow(0 0 10px rgba(251, 191, 36, 1)); }
}
@keyframes wave-bounce {
    0%, 28.5%, 100% { transform: translateY(0); }
    14.25% { transform: translateY(-6px); }
}

.logo-ware-static {
    animation: pulse-glow-white 2s infinite alternate;
}

@keyframes pulse-glow-white {
    from { filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.6)); }
    to { filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.9)); }
}

/* Animated Gradient for Slogan */
.animated-gradient {
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 5s linear infinite;
}
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* DYNAMIC ANIMATIONS */
.animated-word { display: inline-block; }

/* NEW Transition-based approach for smoother scroll animations */
.hidden-for-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.hidden-for-animation.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-status-green { animation: pulseGlowGreen 2.5s infinite alternate; }
@keyframes pulseGlowGreen {
    from { filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.7)); }
    to { filter: drop-shadow(0 0 15px rgba(74, 222, 128, 1)); }
}
.animate-status-red { animation: pulseGlowRed 2.5s infinite alternate; }
@keyframes pulseGlowRed {
    from { filter: drop-shadow(0 0 5px rgba(248, 113, 113, 0.7)); }
    to { filter: drop-shadow(0 0 15px rgba(248, 113, 113, 1)); }
}
.animate-community { animation: gentleWave 4s ease-in-out infinite; }
@keyframes gentleWave {
    0%   { transform: translateY(-4px); }
    50%  { transform: translateY(4px); }
    100% { transform: translateY(-4px); }
}

/* CART SYSTEM STYLES */
#cart-panel {
    z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0s 0.3s;
}
#cart-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease; }
#cart-container { transform: translateX(100%); transition: transform 0.3s ease-in-out; }
#cart-panel.is-open #cart-container { transform: translateX(0); }

/* TOAST NOTIFICATION STYLES */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1003; }
.toast { animation: toastIn 0.5s ease, toastOut 0.5s ease 2.5s forwards; }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* PRODUCT MODAL STYLES */
#product-modal-panel { z-index: 1001; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0s 0.3s; }
#product-modal-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease; }
#product-modal-content { transform: translate(-50%, -50%) scale(0.95); transition: transform 0.3s ease; }
#product-modal-panel.is-open #product-modal-content { transform: translate(-50%, -50%) scale(1); }
.duration-btn { background-color: #3f3f46; border: 1px solid #52525b; transition: background-color 0.2s ease, border-color 0.2s ease; }
.duration-btn:hover { background-color: #52525b; }
.duration-btn.active { background-color: #f59e0b; color: #18181b; border-color: #f59e0b; }

/* QUICK ADD PANEL STYLES */
#quick-add-panel { z-index: 1002; pointer-events: none; }
#quick-add-panel.is-open { pointer-events: auto; }
#quick-add-container { transform-origin: bottom center; opacity: 0; transform: scale(0.9); transition: opacity 0.2s ease, transform 0.2s ease; }
#quick-add-panel.is-open #quick-add-container { opacity: 1; transform: scale(1); }
.quick-add-option { background-color: #27272a; border: 1px solid #52525b; transition: all 0.2s ease; opacity: 0; transform: translateY(10px); }
.quick-add-option:hover { background-color: #3f3f46; border-color: #f59e0b; transform: translateY(5px); }
#quick-add-panel.is-open .quick-add-option { opacity: 1; transform: translateY(0); }
#quick-add-panel.is-open .quick-add-option:nth-child(1) { transition-delay: 0.0s; }
#quick-add-panel.is-open .quick-add-option:nth-child(2) { transition-delay: 0.07s; }
#quick-add-panel.is-open .quick-add-option:nth-child(3) { transition-delay: 0.14s; }

/* --- AUTH & CUSTOMER PANEL STYLES --- */
.auth-panel { z-index: 1001; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0s 0.3s; }
.auth-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease; }
.auth-panel-content { transform: translate(-50%, -50%) scale(0.95); transition: transform 0.3s ease; }
.auth-panel.is-open .auth-panel-content { transform: translate(-50%, -50%) scale(1); }

#auth-panel-shaker { overflow: hidden; position: relative; } /* Needed for animations */
#auth-panel-shaker.shake { animation: shake 0.5s ease; }
@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}
.password-req { transition: color 0.3s ease; }
.password-req.met { color: #4ade80; /* green-400 */ }

/* --- AUTH VIEW TRANSITIONS --- */
.auth-view {
    animation-duration: 0.3s;
    animation-fill-mode: forwards;
}
@keyframes fade-out-slide-left {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-30px); }
}
@keyframes fade-in-slide-right {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fade-out-slide-right {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}
@keyframes fade-in-slide-left {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
.animate-fade-out-left { animation-name: fade-out-slide-left; }
.animate-fade-in-right { animation-name: fade-in-slide-right; }
.animate-fade-out-right { animation-name: fade-out-slide-right; }
.animate-fade-in-left { animation-name: fade-in-slide-left; }

/* --- LOGOUT MODAL ANIMATION --- */
#logout-confirm-panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
#logout-confirm-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}
#logout-confirm-content {
    transform: translate(-50%, -50%) scale(1.05);
    transition: transform 0.3s ease;
}
#logout-confirm-panel.is-open #logout-confirm-content {
    transform: translate(-50%, -50%) scale(1);
}

/* --- PASSWORD VISIBILITY TOGGLE --- */
.toggle-password-vis {
    position: absolute;
    right: 0.75rem; /* 12px */
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    filter: invert(75%);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.toggle-password-vis:hover {
    opacity: 1;
}
.icon-bounce-animate {
    animation: icon-bounce 0.3s ease;
}
@keyframes icon-bounce {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.25); }
    100% { transform: translateY(-50%) scale(1); }
}

/* --- SQUARE PAYMENT FORM STYLES --- */
#card-container {
    border: 1px solid #52525b; /* Zinc 600 */
    border-radius: 0.5rem; /* 8px */
    padding: 1rem; /* 16px */
    background-color: #f4f4f5; /* Zinc 100 */
    transition: background-color 0.3s ease;
}

/* --- TURNSTILE & TERMS OF SERVICE STYLES --- */
.turnstile-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}
.terms-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.terms-container label {
    color: #a1a1aa; /* Zinc 400 */
    font-size: 0.875rem;
    margin-left: 0.5rem;
}
 .terms-container label a { /* Style for the links */
    color: #fbbf24; /* Amber 400 */
    text-decoration: underline;
    cursor: pointer;
}
.terms-container label a:hover {
    color: #f59e0b; /* Amber 500 */
}
.terms-container input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid #52525b; /* Zinc 600 */
    background-color: #27272a; /* Zinc 800 */
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
}
.terms-container input[type="checkbox"]:checked {
    background-color: #f59e0b; /* Amber 500 */
    border-color: #f59e0b;
}
.terms-container input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #18181b; /* Zinc 900 */
    font-weight: bold;
    font-size: 0.75rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- T.O.S. MODAL STYLES --- */
#tos-panel { z-index: 1002; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0s 0.3s; }
#tos-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease; }
#tos-panel-content { transform: translate(-50%, -50%) scale(0.95); transition: transform 0.3s ease; }
#tos-panel.is-open #tos-panel-content { transform: translate(-50%, -50%) scale(1); }
/* Styling for the content area */
#tos-content-area { color: #d4d4d8; /* Zinc 300 */ }
#tos-content-area h3 { 
    font-size: 1.5rem; /* Larger main headings */
    font-weight: bold; 
    margin-top: 1.5rem; 
    margin-bottom: 1rem; 
    color: #fff; 
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #3f3f46; /* Zinc 700 */
}
 #tos-content-area h3:first-child { margin-top: 0; } /* Remove top margin for the first heading */
#tos-content-area h4 { 
    font-size: 1.1rem; /* Slightly larger sub-headings */
    font-weight: bold; 
    margin-top: 1.25rem; 
    margin-bottom: 0.5rem; 
    color: #e4e4e7; /* Zinc 200 */
}
#tos-content-area p { margin-bottom: 1rem; line-height: 1.7; }
#tos-content-area ul { margin-left: 1.5rem; list-style-type: disc; margin-bottom: 1rem; }
#tos-content-area li { margin-bottom: 0.5rem; }
 #tos-content-area strong { color: #f59e0b; /* Amber 500 */ } /* Highlight important text */
 /* Add a separator between T.O.S. and Privacy Policy */
.policy-separator {
    border-top: 2px solid #52525b; /* Zinc 600 */
    margin-top: 2rem;
    padding-top: 1.5rem;
}
 /* Style for the non-linked email */
.email-display {
    color: #fbbf24; /* Amber 400 */
    text-decoration: underline;
}
 /* Style for the smaller copyright symbol */
sup { 
    font-size: 0.6em; /* Adjust size as needed */
    vertical-align: super; /* Ensure it's raised */
}

/* === STEP 2: ADDED OVERLAY CSS === */
#turnstile-overlay {
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease;
}
#turnstile-overlay.verified {
    opacity: 0;
    pointer-events: none;
}

/* === Cropping Modal === */
#crop-modal {
    display: none;
    z-index: 10000;
}
#crop-modal.is-open {
    display: flex;
}
/* Ensure cropper container has proper dimensions */
#crop-image {
    display: block;
    max-width: 100%;
}