:root {
    --primary-color: #89CFF0;
    /* Baby Blue */
    --primary-dark: #5CA3C9;
    --bg-color: #f0f8ff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --text-color: #333;
    --container-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --border-color: rgba(255, 255, 255, 0.18);
    --input-bg: rgba(255, 255, 255, 0.9);
}

body.dark-mode {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --bg-color: #1a1a2e;
    --glass-bg: rgba(20, 20, 35, 0.85);
    --text-color: #e0e0e0;
    --container-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --border-color: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(40, 40, 50, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    background-image: url('doraemon_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 0;
}

body.dark-mode .overlay {
    background: rgba(0, 0, 0, 0.5);
}

.container {
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--container-shadow);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: transform 0.3s;
}

.theme-btn:hover {
    transform: rotate(15deg) scale(1.1);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="text"] {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus {
    border-color: var(--primary-color);
}

button#generate-btn {
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.2s;
}

button#generate-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

button#generate-btn:active {
    transform: translateY(0);
}

.qr-container {
    background: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 15px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

body.dark-mode .qr-container {
    background: rgba(255, 255, 255, 0.1);
}

#qrcode img {
    border: 5px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#instruction-text {
    color: var(--text-color);
    margin-top: 1rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

footer {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#qrcode {
    animation: fadeIn 0.5s ease-out;
}