/* QR Code Generator Tool Styles */
.qr-generator-tool {
    min-height: 100vh;
    background: white;
    padding: 2rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.tool-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-header h1 i {
    margin-right: 1rem;
    color: #2c8462;
}

.tool-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Generator Interface */
.generator-interface {
    margin-bottom: 3rem;
}

.generator-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Section Labels */
.section-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* Type Selection */
.type-selection {
    margin-bottom: 2rem;
}

.type-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.type-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.type-tab:hover {
    border-color: #39c94c;
    background: #f0f8f5;
    color: #2ac450;
}

.type-tab.active {
    border-color: #2c8462;
    background: #10a875;
    color: white;
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.3);
}

.type-tab i {
    font-size: 1.2rem;
}

/* Input Forms */
.input-forms {
    margin-bottom: 2rem;
}

.input-form {
    display: none;
}

.input-form.active {
    display: block;
}

.input-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-input,
.form-textarea,
.form-select {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #2c8462;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 132, 98, 0.1);
}

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

.clear-btn,
.toggle-password {
    position: absolute;
    right: 1rem;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.toggle-password {
    background: #6c757d;
}

.form-input:not(:placeholder-shown) + .clear-btn,
.form-textarea:not(:placeholder-shown) + .clear-btn,
.form-input:not(:placeholder-shown) + .toggle-password {
    opacity: 1;
    transform: scale(1);
}

.clear-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.toggle-password:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.input-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-hint i {
    color: #2c8462;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: #f8f9fa;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2c8462;
    border-color: #2c8462;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Customization Section */
.customization-section {
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.custom-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.custom-select {
    padding: 0.8rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #f8f9fa;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select:focus {
    outline: none;
    border-color: #2c8462;
    background: white;
}

.color-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input {
    width: 50px;
    height: 40px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-text {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #f8f9fa;
    color: #333;
    font-size: 0.9rem;
    font-family: monospace;
}

.color-text:focus {
    outline: none;
    border-color: #2c8462;
    background: white;
}

/* Action Controls */
.action-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.generate-btn {
    background: linear-gradient(135deg, #2c8462 0%, #1e5f47 100%);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 132, 98, 0.4);
}

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generation-status {
    margin-top: 1rem;
    text-align: center;
}

.generation-status small {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generation-status i {
    color: #2c8462;
}

/* Result Section */
.result-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 2rem;
    animation: slideIn 0.5s ease-out;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.qr-result {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.qr-preview {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.qr-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-preview:hover .qr-overlay {
    opacity: 1;
}

.qr-actions {
    display: flex;
    gap: 0.5rem;
}

.qr-action-btn {
    background: white;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qr-action-btn:hover {
    background: #2c8462;
    color: white;
    transform: scale(1.1);
}

.qr-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qr-data {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e1e5e9;
}

.data-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-value {
    font-size: 1rem;
    color: #333;
    word-break: break-all;
    line-height: 1.5;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    font-family: monospace;
}

/* Download Options */
.download-options {
    margin-bottom: 2rem;
}

.download-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-btn:hover {
    border-color: #2c8462;
    background: #f0f8f5;
    color: #2c8462;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.2);
}

.download-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.download-btn span {
    font-weight: 600;
    font-size: 1rem;
}

.download-btn small {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* QR Details */
.qr-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.details-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.detail-label {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c8462;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Messages */
.error-message,
.success-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Recent QR Codes */
.recent-qr-codes {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.recent-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.recent-list {
    margin-bottom: 1.5rem;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border: 1px solid #e1e5e9;
}

.recent-item:last-child {
    margin-bottom: 0;
}

.recent-qr-info {
    flex: 1;
    margin-right: 1rem;
}

.recent-type {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.recent-data {
    font-size: 0.9rem;
    color: #333;
    word-break: break-all;
}

.recent-actions {
    display: flex;
    gap: 0.5rem;
}

.recent-action-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.recent-download-btn {
    background: #28a745;
    color: white;
}

.recent-download-btn:hover {
    background: #218838;
}

.recent-copy-btn {
    background: #007bff;
    color: white;
}

.recent-copy-btn:hover {
    background: #0056b3;
}

.clear-history-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-history-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Popular Examples */
.popular-examples {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.popular-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

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

.example-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-item:hover {
    border-color: #2c8462;
    background: #f0f8f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.2);
}

.example-icon {
    width: 50px;
    height: 50px;
    background: #2c8462;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.example-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.example-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Advanced Features */
.advanced-features {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.features-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

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

.feature-card {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #2c8462;
    background: #f0f8f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2c8462 0%, #1e5f47 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.feature-btn {
    background: #2c8462;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-btn:hover {
    background: #1e5f47;
    transform: translateY(-1px);
}

.feature-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* SEO Content */
.seo-content {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 0 1rem;
    color: #333;
    line-height: 1.6;
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2c8462;
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 2rem 0 1rem;
}

.seo-content p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.seo-content strong {
    color: #2c8462;
    font-weight: 600;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: #667eea;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: #f8fafc;
    color: #667eea;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2.2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .generator-card {
        padding: 1.5rem;
    }

    /* Keep 3 tabs per row on tablets for better space utilization */
    .type-tabs {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .type-tab {
        padding: 0.8rem 0.4rem;
        font-size: 0.85rem;
    }

    .type-tab i {
        font-size: 1.1rem;
    }

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

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

    .qr-result {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .seo-content {
        margin-top: 2rem;
    }

    .seo-content h2 {
        font-size: 1.5rem;
    }

    .seo-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    /* Keep 2 tabs per row on smaller mobile devices */
    .type-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .type-tab {
        padding: 1rem 0.5rem;
        font-size: 0.8rem;
    }

    .type-tab i {
        font-size: 1rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .qr-generator-tool {
        padding: 1rem 0.5rem;
    }

    .tool-header h1 {
        font-size: 1.8rem;
    }

    .generator-card {
        padding: 1rem;
    }

    /* Still keep 2 tabs per row even on very small screens for better UX */
    .type-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }

    .type-tab {
        padding: 0.9rem 0.3rem;
        font-size: 0.75rem;
    }

    .type-tab i {
        font-size: 0.9rem;
    }

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

    .generate-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Additional mobile optimization for very small screens */
@media (max-width: 360px) {
    .type-tab {
        padding: 0.8rem 0.2rem;
        font-size: 0.7rem;
        gap: 0.3rem;
    }

    .type-tab i {
        font-size: 0.85rem;
    }

    .type-tab span {
        line-height: 1.2;
    }

    .related-tools-section {
        padding: 1rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}
