:root {
  --font-main: 'Inter', system-ui, sans-serif;
  --bg-gradient-start: #f0f2f5;
  --bg-gradient-end: #e6e9ee;
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(255, 255, 255, 0.9);
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --accent-color: #3b82f6;
  --button-bg: #edf2f7;
  --button-shadow: 5px 5px 10px #d4d9e0, -5px -5px 10px #ffffff;
  --button-shadow-inset: inset 5px 5px 10px #d4d9e0, inset -5px -5px 10px #ffffff;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background-color: var(--bg-gradient-start);
}

.background-gradient {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(120deg, var(--bg-gradient-start), var(--bg-gradient-end));
  z-index: -1;
}

.app-nav { /* Basic nav styles */
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; background: var(--card-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}
.logo { font-weight: 700; font-size: 1.25rem; color: var(--text-primary); text-decoration: none; }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

@media (max-width: 768px) {
    .app-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

main {
    padding: 1rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.tool-header h1 { font-size: 2rem; font-weight: 700; }
.tool-header p { font-size: 1rem; color: var(--text-secondary); }

.app-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem; /* Add horizontal padding */
}

.controls-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    align-self: start;
    width: auto; /* Remove fixed width */
}

@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; }
    main { padding: 0.5rem; }
    .tool-header h1 { font-size: 1.75rem; }
    .tool-header p { font-size: 0.9rem; }
}

.controls-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.control-group { margin-bottom: 2rem; }
.control-group h3 { font-size: 1rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 1rem; }

input[type="url"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: var(--font-main);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--button-bg);
    box-shadow: var(--button-shadow-inset);
}

.action-button {
    width: 100%; padding: 1rem; border-radius: 12px; background: var(--accent-color);
    border: none; cursor: pointer; font-size: 1rem; color: white;
    font-weight: 500; transition: all 0.2s ease-in-out;
}
.action-button:hover { filter: brightness(1.1); }

.preview-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-card {
    padding: 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

#qr-canvas {
    width: 100%;
    max-width: 400px;
    height: auto;
    image-rendering: pixelated;
}

.app-footer { text-align: center; padding: 2rem; color: var(--text-secondary); font-size: 0.875rem; }

.toast { /* Basic toast styles */
    position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
    padding: 1rem 2rem; border-radius: 8px; background-color: var(--accent-color);
    color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.2); transition: bottom 0.5s ease-in-out;
}
.toast.show { bottom: 30px; }

emoji-picker { width: 100%; --background: transparent; }

@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; }
    main { padding: 0.5rem; }
    .tool-header h1 { font-size: 1.75rem; }
    .tool-header p { font-size: 0.9rem; }
}