/* ===== GERADOR DE QR CODE - STYLES ===== */

.tool-header {
    background: linear-gradient(135deg, #1e293b, var(--primary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.security-badge {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #22c55e;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tool-container {
    max-width: 1200px;
    margin: -2rem auto 3rem;
    position: relative;
    z-index: 10;
}

.tool-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ===== TABS STYLES ===== */

.tool-tabs {
    display: flex;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.tool-tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
}

.tool-tab:hover {
    background: var(--bg-light);
    color: var(--text-color);
}

.tool-tab.active {
    background: var(--bg-light);
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ===== CONTENT LAYOUT ===== */

.tool-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    padding: 2rem;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== FORM STYLES ===== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== WIFI SPECIFIC STYLES ===== */

.wifi-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.security-type {
    grid-column: 1 / -1;
}

.hidden-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    grid-column: 1 / -1;
}

.hidden-field input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ===== BUTTONS ===== */

.generate-btn {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.generate-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-btn {
    background: #22c55e;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.clear-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ===== OUTPUT SECTION ===== */

.output-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 1rem;
    border: 2px dashed var(--border-color);
    min-height: 400px;
    justify-content: center;
}

.output-section.has-qr {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.qr-preview {
    max-width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.qr-info {
    text-align: center;
    color: var(--text-light);
}

.qr-info h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.qr-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 250px;
}

.placeholder-content {
    text-align: center;
    color: var(--text-light);
}

.placeholder-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ===== CUSTOMIZATION SECTION ===== */

.customization-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.customization-section h4 {
    grid-column: 1 / -1;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}

.size-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-input input[type="range"] {
    flex: 1;
}

.size-display {
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
}

/* ===== FEATURES SECTION ===== */

.features-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }

    .tool-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
        overflow-x: hidden;
    }

    .output-section {
        order: -1;
        min-height: 300px;
    }

    .wifi-fields {
        grid-template-columns: 1fr;
    }

    .customization-section {
        grid-template-columns: 1fr;
    }

    .tool-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

/* ===== ERROR STATES ===== */

.error-message {
    color: #ef4444 !important;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #ef4444;
}

/* ===== SUCCESS STATES ===== */

.success-message {
    color: #22c55e !important;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.form-group.success input,
.form-group.success textarea,
.form-group.success select {
    border-color: #22c55e;
}

/* ===== LOADING STATES ===== */

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}