/* ============================================================
   QR-OG — Premium Minimalist Styles
   Powered by Orujov
   ============================================================ */

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

/* ---- Base / Premium Background ---- */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 40%, #eef2f6 100%);
    background-image: radial-gradient(#dce2ec 0.8px, transparent 0.8px);
    background-size: 28px 28px;
    color: #1e293b;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Decorative Background Orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

body::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.07) 0%, transparent 65%);
    top: -180px;
    right: -120px;
}

body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 65%);
    bottom: -120px;
    left: -100px;
}

/* ---- Header Logo Badge ---- */
.logo-badge {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.06);
}

/* ---- Main Card Glass Effect (Desktop) ---- */
.main-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: box-shadow 0.4s ease;
}

.main-card:hover {
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.06);
}

/* ---- QR Preview Container ---- */
#canvas-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
}

#canvas-container canvas,
#canvas-container svg {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ---- Creative Color Cards ---- */
.creative-color-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.creative-color-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.creative-color-card.active {
    border-color: #3b82f6;
    background-color: #f0f7ff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08);
}

/* ---- Elegant Design Buttons ---- */
.design-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.design-btn:hover {
    border-color: #cbd5e1;
}

.design-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

/* ---- Scan Animation ---- */
.scan-glow-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(59, 130, 246, 0.01) 0%,
        rgba(59, 130, 246, 0.12) 50%,
        rgba(59, 130, 246, 0.01) 100%
    );
    animation: scanMotion 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
    border-radius: inherit;
}

@keyframes scanMotion {
    0%,
    100% {
        transform: translateY(-100%);
    }
    50% {
        transform: translateY(100%);
    }
}

/* ---- Input Fields ---- */
.primary-input {
    border: 2px solid #e2e8f0;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.9);
}

.primary-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    outline: none;
    background: #ffffff;
}

.primary-input.has-error {
    border-color: #ef4444;
}

.primary-input.has-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* ---- URL Error ---- */
.url-error {
    font-size: 0.75rem;
    color: #ef4444;
    min-height: 1.25em;
    padding-top: 2px;
    transition: all 0.2s ease;
}

/* ---- Custom Shadow ---- */
.clean-shadow {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04),
        0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

/* ---- Toast Notification ---- */
.qr-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
    backdrop-filter: blur(8px);
    pointer-events: auto;
}

.qr-toast--visible {
    transform: translateY(0);
    opacity: 1;
}

.qr-toast--success {
    background: linear-gradient(135deg, #059669, #10b981);
}

.qr-toast--error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.qr-toast--info {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.qr-toast__icon {
    display: flex;
    flex-shrink: 0;
}

.qr-toast__text {
    flex: 1;
    line-height: 1.4;
}

.qr-toast__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}

.qr-toast__close:hover {
    color: #fff;
}

/* ---- Copy Button ---- */
.btn-copy {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-copy:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.btn-copy:active {
    transform: scale(0.97);
}

/* ---- QR URL Display ---- */
#qr-url-display {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* ---- Download Buttons Grid ---- */
.dl-btn {
    transition: all 0.2s ease;
    cursor: pointer;
}

.dl-btn:active {
    transform: scale(0.97);
}

.dl-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ---- Active Scale Utility ---- */
.active\:scale-98:active {
    transform: scale(0.98);
}

/* ---- Footer ---- */
.footer-brand {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.footer-brand:hover {
    opacity: 1;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 640px) {
    body {
        background-size: 18px 18px;
    }

    body::before,
    body::after {
        display: none;
    }

    .main-card {
        background: #ffffff;
        backdrop-filter: none;
    }

    .logo-badge {
        background: #ffffff;
        backdrop-filter: none;
    }

    .qr-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

@media (min-width: 1024px) {
    body {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (min-width: 1536px) {
    body {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}
