:root {
    /* Color Palette */
    --bg-color: #0d0f1a;
    --card-bg: rgba(23, 26, 43, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(139, 92, 246, 0.5);
    
    --qr-bg: #ffffff;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Blobs */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(99,102,241,0.4) 0%, rgba(13,15,26,0) 70%);
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(236,72,153,0.3) 0%, rgba(13,15,26,0) 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 60%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(168,85,247,0.3) 0%, rgba(13,15,26,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Glassmorphism App Container */
.app-container {
    width: 100%;
    max-width: 460px;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 10;
    margin: 20px;
    transform: translateY(0);
    transition: var(--transition);
}

.app-container:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow), inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 20px;
    margin-bottom: 16px;
    font-size: 32px;
    color: white;
    box-shadow: var(--shadow-glow);
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--input-focus);
}

input:focus + .input-icon,
.input-group:focus-within .input-icon {
    color: var(--primary-color);
}

/* Buttons */
button {
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: var(--transition);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.primary-btn:hover::before {
    opacity: 1;
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    flex: 1;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
}

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

.icon-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    font-size: 20px;
}

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

/* Result Section */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin-top 0.4s ease-in-out;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--card-border);
}

.result-section.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top-color: transparent;
    pointer-events: none;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.qr-wrapper {
    background: var(--qr-bg);
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0,0,0,0.05);
    transform: rotateX(0deg);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.qr-wrapper:hover {
    transform: scale(1.02) translateY(-5px);
}

@keyframes popIn {
    0% { transform: scale(0.8) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.action-buttons {
    display: flex;
    gap: 12px;
}

/* Toaster for notifications */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: #10b981;
    font-size: 18px;
}

/* Responsiveness */
@media (max-width: 480px) {
    .app-container {
        padding: 24px;
        margin: 16px;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
}
