/* Linigu QR-Code Generator - Modern Stylesheet */

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

:root {
    --primary-color: #000;
    --secondary-color: #fff;
    --accent-color: #6366f1;
    --text-color: #1f2937;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #000 0%, #1f2937 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--accent-color);
}

.header-content {
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 40px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo h1 {
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 300;
    margin-top: 10px;
}

/* Language Selector */
.language-selector {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.language-selector label {
    font-size: 1.3em;
}

.language-selector select {
    padding: 8px 15px;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background-color: white;
    color: var(--text-color);
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
}

.language-selector select:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Main Content */
main {
    padding: 20px 0;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.form-card h2 {
    margin-bottom: 30px;
    font-size: 1.8em;
    text-align: center;
}

/* Input Group */
.input-group {
    margin-bottom: 30px;
}

#qr-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

#qr-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#char-count {
    display: block;
    text-align: right;
    color: #9ca3af;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Controls */
.controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    font-size: 0.95em;
}

#qr-size {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--accent-color), var(--text-color));
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

#qr-size::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

#qr-size::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#qr-size::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

#qr-size::-moz-range-thumb:hover {
    transform: scale(1.2);
}

#size-value {
    text-align: center;
    font-weight: 600;
    color: var(--accent-color);
}

select {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Button Group */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #4f46e5);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

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

/* Message */
.message {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

.message.error {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fca5a5;
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* QR Container */
.preview-section {
    margin-bottom: 40px;
}

.qr-container {
    background: white;
    border-radius: 16px;
    padding: 60px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
}

.qr-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.placeholder-text {
    color: #9ca3af;
    font-size: 1.1em;
}

/* Features Section */
.features-section {
    margin-bottom: 40px;
}

.features-section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.feature-card p {
    color: #6b7280;
    font-size: 0.95em;
}

/* Trust Section */
.trust-section {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 50px 30px;
    border-radius: 16px;
    margin-bottom: 40px;
}

.trust-section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.trust-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.trust-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 15px;
}

.trust-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.trust-card p {
    color: #6b7280;
    font-size: 0.9em;
}

/* AdSense Section */
.ads-section {
    margin: 40px 0;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 3px solid var(--accent-color);
}

footer p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-links {
    font-size: 0.9em;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.8em;
    }

    .form-card {
        padding: 25px;
    }

    .controls-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .qr-container {
        min-height: 300px;
        padding: 40px 15px;
    }

    header {
        padding: 25px 15px;
    }

    .logo {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        font-size: 30px;
    }

    .logo h1 {
        font-size: 1.4em;
    }

    .form-card {
        padding: 20px;
    }

    .tagline {
        font-size: 0.95em;
    }

    .features-section h2,
    .trust-section h2 {
        font-size: 1.5em;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .features-section,
    .trust-section,
    .ads-section {
        display: none;
    }

    .qr-container {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f9fafb;
        --light-bg: #111827;
        --border-color: #374151;
    }

    body {
        background-color: #1f2937;
    }

    .form-card,
    .feature-card,
    .trust-card,
    .qr-container,
    .ads-section {
        background: #2d3748;
        color: #f9fafb;
    }

    select {
        background-color: #2d3748;
        color: #f9fafb;
    }

    #qr-input {
        background-color: #2d3748;
        color: #f9fafb;
        border-color: #4b5563;
    }
}
