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

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #f4f6fa;
    color: #1e293b;
    padding: 24px 16px;
}

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

.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    color: #475569;
    margin-top: 8px;
    font-size: 0.9rem;
}

.no-signup-badge {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

.tabs-wrapper {
    margin-bottom: 28px;
}

.tabs-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tab-btn {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 10px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #1e293b;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #e2e8f0;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.tool-panel {
    display: none;
    background: white;
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2ff;
}

.tool-panel.active {
    display: block;
}

.tool-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-left: 5px solid #3b82f6;
    padding-left: 16px;
    color: #0f172a;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    background: #fafcff;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-area.has-file {
    border-color: #10b981;
    background: #f0fdf4;
}

.filename-badge {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #059669;
    background: #d1fae5;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

input, select, textarea {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 10px 14px;
    color: #0f172a;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 12px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button, .btn-primary {
    background: #3b82f6;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-area {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 20px;
    display: none;
    border: 1px solid #e2e8f0;
}

.result-area.show {
    display: block;
}

.status-message {
    padding: 12px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.status-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff80;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 16px;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
}

.resize-inputs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.resize-inputs div {
    flex: 1;
}

.resize-inputs label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.crop-container {
    text-align: center;
    margin-top: 16px;
}

#cropImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 16px;
}

.crop-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
    justify-content: center;
    align-items: center;
}

.ratio-btn {
    background: #e2e8f0;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    color: #1e293b;
}

.ratio-btn.active-ratio {
    background: #3b82f6;
    color: white;
}

.compact-select {
    width: auto;
    display: inline-block;
    margin: 0 0 12px 0;
}

.stats-box {
    margin-top: 20px;
    background: #f1f5f9;
    padding: 16px;
    border-radius: 20px;
}

.color-info {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 16px;
    margin: 16px 0;
    text-align: center;
}

.color-info p {
    margin: 8px 0;
    font-size: 1.1rem;
}

#colorPicker {
    width: 100%;
    height: 60px;
    cursor: pointer;
}

.checkbox-group {
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.checkbox-group input {
    width: auto;
    margin-bottom: 0;
}

.info-note {
    color: #475569;
    font-size: 12px;
    margin-top: 12px;
}

.social-section {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 28px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
}

.social-btn.facebook {
    background: #1877f2;
    color: white;
}

.social-btn.twitter {
    background: #1da1f2;
    color: white;
}

.social-btn.whatsapp {
    background: #25d366;
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.feedback-area {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.rating-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.rating-btn {
    font-size: 2rem;
    background: none;
    padding: 8px 20px;
    cursor: pointer;
}

.rating-btn:hover {
    transform: scale(1.1);
    background: #f1f5f9;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #64748b;
    font-size: 0.75rem;
}

@media (max-width: 700px) {
    .tab-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
    .tool-panel {
        padding: 20px 16px;
    }
    .tool-title {
        font-size: 1.3rem;
    }
}

/* QR code centering */
.qr-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.qr-center canvas {
    display: block;
}

/* Navigation between tools */
.tools-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 60px;
    border: 1px solid #e2e8f0;
}
.tools-nav a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 20px;
}
.tools-nav a:hover {
    background: #e2e8f0;
}
.tools-nav span {
    color: #cbd5e1;
}
