/* public/css/style.css */

.gat-qf-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Main Container: Form + Preview */
.gat-qf-main-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .gat-qf-main-container {
        grid-template-columns: 500px 1fr;
    }
}

.gat-qf-announcement {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
}

/* Live Users Counter */
.gat-qf-live-counter {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

#gat-live-count {
    font-size: 18px;
    font-weight: 700;
    min-width: 30px;
    display: inline-block;
}

.gat-qf-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.gat-qf-form h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #1e293b;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.form-group select,
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input[type="file"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0ea5e9;
}

.help-text {
    font-size: 14px;
    color: #64748b;
    margin-top: 5px;
}

/* Tabs */
.gat-qf-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s;
}

.tab-button.active {
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-whatsapp {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

.btn-primary:disabled,
.btn-cooldown {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.7;
}

.btn-secondary {
    background: white;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
}

.btn-secondary:hover {
    background: #f0f9ff;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    margin-top: 15px;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* Loading */
.gat-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #e2e8f0;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Grid */
.gat-results {
    margin-top: 30px;
}

.gat-results h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #1e293b;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.result-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.result-image {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 12px;
}

.result-image img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    display: block;
}

.result-info {
    padding: 15px;
}

.similarity-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.exam-badge,
.subject-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.exam-badge {
    background: #dbeafe;
    color: #1e40af;
}

.subject-badge {
    background: #fef3c7;
    color: #92400e;
}

/* No Results / Error */
.gat-no-results,
.gat-error {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    margin-top: 20px;
}

.gat-error {
    background: #fef2f2;
    color: #991b1b;
}

/* Tablet and up */
@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Image Preview Box - Inside Main Container */
#gat-qf-preview {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    grid-template-columns: 1fr;
    gap: 20px;
    align-self: start;
    position: sticky;
    top: 20px;
}

#gat-qf-preview.active {
    display: grid;
}





.preview-image-container {
    position: relative;
    max-width: 100%;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.preview-image-container img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    display: block;
}

.preview-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .preview-image-container img {
        max-height: 450px;
    }
}

@media (min-width: 1200px) {
    .preview-image-container img {
        max-height: 550px;
    }
}



/* Desktop */
@media (min-width: 1024px) {
    .gat-qf-container {
        max-width: 1200px;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}