:root {
    --primary-color: #646cff;
    --primary-hover: #535bf2;
    --background: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #213547;
    --border-color: #e9ecef;
    --error-color: #dc3545;
    --success-color: #28a745;
    font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #242424;
        --card-background: #1a1a1a;
        --text-color: rgba(255, 255, 255, 0.87);
        --border-color: #2a2a2a;
    }
}

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

body {
    background-color: var(--background);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 2rem;
    padding: 0 1rem;
}

.card {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-background);
    color: var(--text-color);
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px #646cff33;
}

.url-preview-container {
    display: flex;
    gap: 0.5rem;
}

.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

canvas {
    background: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.primary-button,
.secondary-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-button {
    background: var(--primary-color);
    color: #fff;
}

.primary-button:hover {
    background: var(--primary-hover);
}

.secondary-button {
    background: var(--border-color);
    color: var(--text-color);
}

.secondary-button:hover {
    background: #d1d5db;
}

.hidden {
    display: none;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%) translateY(100%);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    background: var(--card-background);
    color: var(--text-color);
    box-shadow: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.show {
    transform: translate(-50%) translateY(0);
}

@media (max-width: 640px) {
    .container {
        margin: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
        width: 100%;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }
}