:root {
    --color-white: #ffffff;
    --color-blue-50: #eff6ff;
    --color-blue-100: #dbeafe;
    --color-blue-200: #bfdbfe;
    --color-blue-500: #3b82f6;
    --color-blue-600: #2563eb;
    --color-blue-700: #1d4ed8;
    --color-blue-800: #1e40af;
    --color-purple-50: #faf5ff;
    --color-purple-100: #f3e8ff;
    --color-purple-200: #e9d5ff;
    --color-purple-500: #a855f7;
    --color-purple-600: #9333ea;
    --color-purple-700: #7e22ce;
    --color-purple-800: #6b21a8;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--color-blue-50) 0%, var(--color-purple-50) 100%);
    color: var(--color-gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--color-blue-600) 0%, var(--color-purple-600) 100%);
    color: var(--color-white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
}

.visitor-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.visitor-count svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-blue-600) 0%, var(--color-purple-600) 100%);
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content */
.main {
    flex: 1;
    padding: 3rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.panel {
    background: var(--color-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-gray-200);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-blue-700);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* QR Type Buttons */
.qr-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.qr-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    border: 2px solid var(--color-gray-200);
    background: var(--color-white);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray-700);
}

.qr-type-btn svg {
    width: 2rem;
    height: 2rem;
    stroke: var(--color-blue-600);
    transition: all 0.3s ease;
}

.qr-type-btn:hover {
    border-color: var(--color-blue-400);
    background: var(--color-blue-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.qr-type-btn.active {
    border-color: var(--color-blue-600);
    background: linear-gradient(135deg, var(--color-blue-600) 0%, var(--color-purple-600) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.qr-type-btn.active svg {
    stroke: var(--color-white);
}

/* Forms */
.form-container {
    position: relative;
    min-height: 300px;
}

.qr-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.qr-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.form-label:first-child {
    margin-top: 0;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-blue-600);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-blue-600) 0%, var(--color-purple-600) 100%);
    color: var(--color-white);
    width: 100%;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-blue-700);
    border: 2px solid var(--color-blue-600);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--color-blue-50);
    transform: translateY(-2px);
}

/* QR Display */
.qr-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: linear-gradient(135deg, var(--color-blue-50) 0%, var(--color-purple-50) 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 2px dashed var(--color-blue-300);
}

.qr-placeholder {
    text-align: center;
    color: var(--color-gray-400);
}

.qr-placeholder svg {
    width: 6rem;
    height: 6rem;
    margin-bottom: 1rem;
    stroke: var(--color-gray-300);
}

.qr-placeholder p {
    font-size: 1.125rem;
    font-weight: 500;
}

.qr-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.qr-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Statistics */
.stats-container {
    background: linear-gradient(135deg, var(--color-blue-50) 0%, var(--color-purple-50) 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.stats-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-blue-700);
    margin-bottom: 1rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--color-white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-label {
    font-weight: 600;
    color: var(--color-gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-weight: 700;
    color: var(--color-blue-600);
    font-size: 1.25rem;
}

.stat-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--color-blue-600) 0%, var(--color-purple-600) 100%);
    color: var(--color-white);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--color-blue-700) 0%, var(--color-purple-700) 100%);
    color: var(--color-white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.footer p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        justify-content: center;
        text-align: center;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .panel {
        padding: 1.5rem;
    }
    
    .qr-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qr-type-btn {
        font-size: 0.8rem;
        padding: 0.875rem 0.5rem;
    }
    
    .qr-type-btn svg {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .qr-display {
        min-height: 300px;
        padding: 1.5rem;
    }
    
    .qr-placeholder svg {
        width: 4rem;
        height: 4rem;
    }
    
    .qr-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .panel {
        padding: 1.25rem;
    }
    
    .panel-title {
        font-size: 1.25rem;
    }
    
    .qr-types {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, var(--color-blue-600) 0%, var(--color-purple-600) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}
