/* Scoped styles for the QR Code App to avoid global conflicts */

:root {
    --qr-bg: rgba(30, 41, 59, 0.7);
    --qr-primary: #6366f1;
    --qr-border: rgba(255, 255, 255, 0.1);
}

/* Ensure the app container centers properly */
.app-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.main-card {
    background: var(--qr-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--qr-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    min-height: 500px;
    margin-top: 2rem;
    /* Spacing from header */
}

/* Common Section Styles */
.input-section,
.display-section {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Left Section */
.input-section {
    border-right: 1px solid var(--qr-border);
}

.brand {
    margin-bottom: 3rem;
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.brand p {
    color: #94a3b8;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="url"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--qr-border);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

input[type="url"]:focus {
    border-color: var(--qr-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

#generate-btn {
    background: linear-gradient(135deg, var(--qr-primary), #8b5cf6);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

#generate-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

#generate-btn:active {
    transform: translateY(0);
}

/* Right Section */
.display-section {
    align-items: center;
    background: rgba(15, 23, 42, 0.3);
    position: relative;
}

.qr-placeholder {
    color: #94a3b8;
    border: 2px dashed var(--qr-border);
    border-radius: 16px;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

#qrcode-container {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

#qrcode-container img {
    display: block;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--qr-border);
    color: #f8fafc;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 0;
}

.secondary-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: #94a3b8;
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-card {
        flex-direction: column;
        height: auto;
    }

    .input-section {
        border-right: none;
        border-bottom: 1px solid var(--qr-border);
        padding: 2rem;
    }

    .display-section {
        padding: 2rem;
    }
}