/* QR Code Generator Styles */
:root {
    --bg-deep: #0a1a2e;
    --bg-card: rgba(20, 40, 60, 0.8);
    --bg-input: rgba(10, 26, 46, 0.6);
    --bg-hover: rgba(59, 158, 190, 0.1);
    --text-primary: #e8f4f8;
    --text-secondary: #a8c8d8;
    --text-muted: #6a8a9a;
    --accent: #3b9ebe;
    --accent-glow: rgba(59, 158, 190, 0.3);
    --border-color: rgba(59, 158, 190, 0.2);
    --success: #4ecdc4;
    --warning: #ff6b6b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ocean Background */
.ocean-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(180deg,
        #0a1a2e 0%,
        #0d2847 30%,
        #1a4a6e 60%,
        #0d3a5c 100%);
}

/* Bubbles Animation */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.2),
        rgba(59, 158, 190, 0.1));
    border-radius: 50%;
    animation: rise linear infinite;
    opacity: 0.6;
}

.bubble:nth-child(1) { left: 5%; width: 20px; height: 20px; animation-duration: 8s; animation-delay: 0s; }
.bubble:nth-child(2) { left: 15%; width: 15px; height: 15px; animation-duration: 10s; animation-delay: 1s; }
.bubble:nth-child(3) { left: 25%; width: 25px; height: 25px; animation-duration: 12s; animation-delay: 2s; }
.bubble:nth-child(4) { left: 35%; width: 18px; height: 18px; animation-duration: 9s; animation-delay: 0.5s; }
.bubble:nth-child(5) { left: 50%; width: 22px; height: 22px; animation-duration: 11s; animation-delay: 3s; }
.bubble:nth-child(6) { left: 60%; width: 16px; height: 16px; animation-duration: 8s; animation-delay: 2s; }
.bubble:nth-child(7) { left: 70%; width: 20px; height: 20px; animation-duration: 10s; animation-delay: 1s; }
.bubble:nth-child(8) { left: 80%; width: 24px; height: 24px; animation-duration: 13s; animation-delay: 4s; }
.bubble:nth-child(9) { left: 88%; width: 14px; height: 14px; animation-duration: 9s; animation-delay: 2.5s; }
.bubble:nth-child(10) { left: 95%; width: 18px; height: 18px; animation-duration: 11s; animation-delay: 0s; }

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { opacity: 0.4; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* Light Rays */
.light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(125, 211, 252, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 30% 0%, rgba(59, 158, 190, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 0%, rgba(59, 158, 190, 0.06) 0%, transparent 50%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.sound-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sound-toggle.sound-on {
    color: var(--accent);
    border-color: var(--accent);
}

.sound-toggle svg {
    width: 20px;
    height: 20px;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Main */
main {
    flex: 1;
}

/* Help Section */
.help-section {
    margin-bottom: 24px;
}

.help-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.help-toggle svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.help-toggle.active {
    border-color: var(--accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.help-content {
    display: none;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.help-content.show {
    display: block;
}

.help-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.help-text p {
    margin-bottom: 12px;
}

.help-text ul, .help-text ol {
    margin: 0 0 16px 20px;
}

.help-text li {
    margin-bottom: 8px;
}

.help-uses {
    margin: 16px 0;
}

.help-example {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.help-example p {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.help-tip {
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid var(--warning);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-top: 16px;
}

/* Controls Section */
.controls-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Type Selector */
.type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-btn:hover {
    border-color: var(--accent);
    color: var(--text-secondary);
}

.type-btn.active {
    background: rgba(59, 158, 190, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.type-btn svg {
    width: 18px;
    height: 18px;
}

/* Input Panels */
.input-panel {
    margin-bottom: 20px;
}

.input-panel.hidden {
    display: none;
}

.input-group {
    margin-bottom: 16px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.input-group select {
    cursor: pointer;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-muted);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent), #2d7a9c);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

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

.generate-btn svg {
    width: 22px;
    height: 22px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.copy-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.download-btn {
    background: linear-gradient(135deg, var(--accent), #2d7a9c);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* QR Section */
.qr-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    min-height: 320px;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #6a8a9a;
    text-align: center;
}

.qr-placeholder svg {
    width: 80px;
    height: 80px;
    opacity: 0.3;
}

.qr-placeholder p {
    font-size: 0.9rem;
}

.qr-placeholder.hidden {
    display: none;
}

#qrCanvas {
    display: block;
}

#qrCanvas.hidden {
    display: none;
}

/* Status Message */
.status-message {
    text-align: center;
    font-size: 0.9rem;
    min-height: 24px;
    color: var(--text-muted);
}

.status-message.success {
    color: var(--success);
}

.status-message.error {
    color: var(--warning);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer .version {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .type-selector {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .qr-container {
        min-width: 280px;
        min-height: 280px;
    }
}
