:root {
    --bg-primary: #e8eef5;
    --bg-secondary: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.5);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: rgba(255, 255, 255, 0.6);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --accent: #667eea;
    --accent-hover: #5a67d8;
    --accent-light: rgba(102, 126, 234, 0.15);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 60px rgba(102, 126, 234, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

body.dark {
    --bg-primary: #0a0a12;
    --bg-secondary: rgba(30, 30, 50, 0.7);
    --bg-glass: rgba(30, 30, 50, 0.5);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-light: rgba(129, 140, 248, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 80px rgba(129, 140, 248, 0.35);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

@keyframes scaleIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    0% { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background: #e8eef5;
}

html.dark {
    background: #0a0a12;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(-45deg, #e8eef5, #dfe6f0, #e6e0f5, #e0eef5);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    transition: color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

body.dark {
    background: linear-gradient(-45deg, #0a0a12, #12121f, #0f0a18, #0a1018);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    transition: background 0.3s ease;
}

.bg-orb-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.2));
    animation: float 8s ease-in-out infinite, pulse 4s ease-in-out infinite;
}

.bg-orb-2 {
    bottom: -15%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.2), rgba(102, 126, 234, 0.15));
    animation: float 10s ease-in-out infinite reverse, pulse 5s ease-in-out infinite;
}

.bg-orb-3 {
    top: 40%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15), transparent);
    animation: float 12s ease-in-out infinite, pulse 6s ease-in-out infinite;
}

body.dark .bg-orb-1 {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.15));
}

body.dark .bg-orb-2 {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.15), rgba(102, 126, 234, 0.1));
}

body.dark .bg-orb-3 {
    background: radial-gradient(circle, rgba(129, 140, 248, 0.1), transparent);
}

.container {
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.input-column {
    flex: 1;
    min-width: 0;
}

.qr-column {
    flex-shrink: 0;
    width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideUp 0.6s ease backwards;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    animation: slideUp 0.6s ease 0.1s backwards;
}

.card {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md), inset 0 1px 1px var(--border-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.5s ease backwards;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), inset 0 1px 1px var(--border-color);
}

.card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
.input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background-color: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
    opacity: 0.5;
    transform: translateX(5px);
}

input:focus,
textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-md);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.customization-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-muted);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-btn:hover {
    color: var(--text-secondary);
    border-color: var(--border-color);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.toggle-btn:active {
    transform: translateY(0) scale(0.98);
}

.toggle-btn.expanded {
    color: var(--accent);
    background: var(--accent-light);
    border-color: transparent;
}

.toggle-btn svg {
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toggle-btn:hover svg,
.toggle-btn.expanded svg {
    opacity: 1;
}

.toggle-btn.expanded svg {
    transform: rotate(90deg);
}

.toggle-btn .arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.toggle-btn.expanded .arrow {
    transform: rotate(180deg);
}

.customization-panel {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border-radius: var(--radius-md);
    margin-bottom: 0;
    border: 1px solid transparent;
}

.customization-panel.expanded {
    max-height: 500px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.option-row:first-child {
    padding-top: 0;
}

.option-row:last-child {
    padding-bottom: 0;
}

.option-row label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.option-row input[type="color"] {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.option-row input[type="color"]:hover {
    border-color: var(--text-muted);
}

.option-row input[type="range"] {
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    cursor: pointer;
    -webkit-appearance: none;
}

.option-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-row input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--text-secondary);
}

.option-row select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.option-row select:focus {
    outline: none;
    border-color: var(--text-muted);
}

.option-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.size-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 45px;
    text-align: right;
}

#qrcode-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-frame {
    position: relative;
    padding: 2rem;
    background: linear-gradient(145deg, #ffffff, #f0f0f5);
    border-radius: 32px;
    box-shadow:
        var(--shadow-lg),
        var(--shadow-glow),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.qr-frame.visible {
    display: block;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qr-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: linear-gradient(90deg, #e0e0e5, #d0d0d8);
    border-radius: 3px;
}

.qr-frame::after {
    content: 'Scan Me';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a0a0a8;
}

body.dark .qr-frame {
    background: linear-gradient(145deg, #2a2a3e, #1e1e2e);
    box-shadow:
        var(--shadow-lg),
        var(--shadow-glow),
        inset 0 2px 4px rgba(255,255,255,0.05),
        inset 0 -2px 4px rgba(0,0,0,0.2);
}

body.dark .qr-frame::before {
    background: linear-gradient(90deg, #3a3a4e, #2a2a3e);
}

body.dark .qr-frame::after {
    color: #606070;
}

#qrcode {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

#qrcode canvas {
    display: block;
}

#qrcode img {
    display: none;
}

.action-buttons {
    display: none;
    gap: 0.75rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 380px;
}

.action-buttons.visible {
    display: flex;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-light);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.action-btn:hover::before {
    width: 200%;
    height: 200%;
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn:active {
    transform: translateY(0) scale(0.98);
}

.action-btn .icon {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.action-btn:hover .icon {
    transform: scale(1.2);
}

.action-btn span:last-child {
    position: relative;
    z-index: 1;
}

.copy-feedback {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.copy-feedback.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    cursor: pointer;
}

.copy-feedback.error {
    background: #d32f2f;
    color: #fff;
}

footer {
    margin-top: auto;
    padding: 3rem 0 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    position: relative;
    z-index: 1;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 0.8;
}

.footer-main {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.footer-lib {
    font-size: 0.75rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    animation: slideUp 0.6s ease 0.2s backwards;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
}

.cross-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.cross-links-label {
    color: var(--text-muted);
    font-weight: 500;
}

.cross-links a {
    color: var(--accent);
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.cross-links a:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

.style-switch {
    display: none;
    justify-content: center;
    gap: 0;
    margin-top: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 3px;
    width: fit-content;
    align-self: center;
}

.style-switch.visible {
    display: flex;
}

.style-option {
    padding: 0.35rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-option:hover {
    color: var(--text-secondary);
}

.style-option.active {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.gradient-colors {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gradient-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.seo-content {
    margin-top: 2rem;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.seo-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.seo-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.seo-content p {
    margin-bottom: 0.75rem;
}

.seo-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.seo-content li {
    margin-bottom: 0.35rem;
}

@media (max-width: 768px) {
    body {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .main-layout {
        flex-direction: column;
    }

    .qr-column {
        width: 100%;
        order: -1;
        margin-bottom: 1.5rem;
    }

    .card {
        padding: 1.25rem;
    }

    .option-row {
        flex-direction: row;
        justify-content: space-between;
    }

    .option-row input[type="range"] {
        width: 80px;
    }

    .action-buttons {
        flex-direction: row;
        max-width: 100%;
    }

    .qr-frame {
        padding: 1.5rem;
        border-radius: 24px;
    }

    #qrcode {
        padding: 0.75rem;
    }

    .bg-orb {
        opacity: 0.5;
    }

    .bg-orb-1 {
        width: 300px;
        height: 300px;
    }

    .bg-orb-2 {
        width: 350px;
        height: 350px;
    }

    .bg-orb-3 {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .header {
        margin-bottom: 1.5rem;
    }

    .card {
        padding: 1rem;
        border-radius: 16px;
        margin-bottom: 0.75rem;
    }

    .card-label {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    .input-group select {
        padding: 0.75rem 0.875rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: 10px;
    }

    .qr-frame {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .qr-frame::before {
        width: 40px;
        height: 4px;
        top: 10px;
    }

    .qr-frame::after {
        font-size: 0.6rem;
        bottom: 8px;
    }

    #qrcode {
        padding: 0.5rem;
        border-radius: 8px;
    }

    .action-buttons {
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .action-btn {
        padding: 0.875rem 0.75rem;
        font-size: 0.85rem;
        border-radius: 10px;
        min-height: 48px; /* Touch-friendly target size */
    }

    .toggle-btn {
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
        min-height: 40px;
    }

    .customization-panel.expanded {
        padding: 0.875rem 1rem;
    }

    .option-row {
        padding: 0.625rem 0;
    }

    .option-row label {
        font-size: 0.75rem;
    }

    .option-row input[type="color"] {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .option-row input[type="range"] {
        width: 70px;
        height: 6px;
    }

    .option-row input[type="range"]::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    .option-row select {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    .size-value {
        font-size: 0.75rem;
        min-width: 40px;
    }

    .copy-feedback {
        bottom: 1rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        border-radius: 10px;
        left: 1rem;
        right: 1rem;
        transform: translateY(20px);
        width: auto;
    }

    .copy-feedback.visible {
        transform: translateY(0);
    }

    footer {
        padding: 2rem 0 1rem;
        font-size: 0.75rem;
    }

    .footer-main {
        font-size: 0.85rem;
    }

    .footer-lib {
        font-size: 0.7rem;
    }

    .bg-orb-1,
    .bg-orb-2 {
        opacity: 0.3;
    }
}

/* Coffee overlay */
.coffee-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.coffee-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.coffee-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.coffee-overlay.visible .coffee-modal {
    transform: scale(1) translateY(0);
}

.coffee-status {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}

.coffee-message {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.75rem;
}

.coffee-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.coffee-btn:hover {
    opacity: 0.9;
}

.coffee-dismiss {
    display: block;
    margin: 1rem auto 0;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem;
}

.coffee-dismiss:hover {
    color: var(--text-secondary);
}

/* Embed mode - hide UI, show only QR code */
body.embed-mode {
    background: transparent;
    padding: 0;
    margin: 0;
    min-height: auto;
    animation: none;
}

body.embed-mode .bg-orb,
body.embed-mode .header,
body.embed-mode .input-column,
body.embed-mode footer,
body.embed-mode .action-buttons,
body.embed-mode .copy-feedback {
    display: none !important;
}

body.embed-mode .container {
    max-width: none;
    width: auto;
}

body.embed-mode .main-layout {
    gap: 0;
}

body.embed-mode .qr-column {
    width: auto;
}

body.embed-mode .qr-frame {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

body.embed-mode .qr-frame::before,
body.embed-mode .qr-frame::after {
    display: none;
}

body.embed-mode #qrcode {
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

body.embed-mode.embed-border #qrcode {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: white;
}

/* Ensure proper touch behavior */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
    }

    .action-btn:hover::before {
        width: 0;
        height: 0;
    }

    .action-btn:hover {
        transform: none;
    }

    .action-btn:active {
        transform: scale(0.98);
        background: var(--accent-light);
    }

    .toggle-btn:hover {
        transform: none;
    }
}
