/**
 * Guest Detection Styles
 * Free trial image analysis - 1 time per day
 */

/* Guest Trial Container */
.guest-trial-container {
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.guest-trial-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.guest-trial-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Guest Trial Header */
.guest-trial-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.trial-badge svg {
    animation: pulse 2s infinite;
}

.trial-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
}

.trial-subtitle {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.95);
}

/* Guest Trial Body */
.guest-trial-body {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* File Upload Zone */
.file-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
}

.file-upload-zone:hover:not(.disabled) {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-zone.drag-over {
    border-color: #667eea;
    background: #e0e7ff;
    transform: scale(1.02);
}

.file-upload-zone.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-content svg {
    margin-bottom: 1rem;
    max-height: 70px;
}

.upload-text {
    font-size: 1rem;
    color: #475569;
    margin: 0 0 0.5rem 0;
}

.upload-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
}

.upload-hint {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
}

/* Upload Preview */
.upload-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.upload-preview img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

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

/* Trial Limit Warning */
.trial-limit-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #92400e;
}

.trial-limit-warning a {
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
}

.trial-limit-warning svg {
    max-height: 50px;
    display: inline-block;
    width: auto;
}

/* Guest Analyze Button */
.guest-analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.guest-analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.guest-analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.guest-analyze-btn .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* Trial Note */
.trial-note {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 1rem;
    margin-bottom: 0;
}

.trial-note a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.trial-note a:hover {
    text-decoration: underline;
}

/* Guest Results */
.guest-results {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
    border: 2px solid #e2e8f0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.close-result-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.close-result-btn:hover {
    color: #475569;
}

/* Result Verdict */
.result-verdict {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.verdict-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.verdict-icon.ai {
    animation: bounce 1s ease-in-out;
}

.verdict-icon.human {
    animation: bounce 1s ease-in-out;
}

.verdict-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.verdict-confidence {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

/* Result Details */
.result-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.detail-label {
    font-weight: 600;
    color: #475569;
}

.detail-value {
    color: #1e293b;
    font-weight: 500;
}

.detail-value.safe {
    color: #10b981;
}

.detail-value.warning {
    color: #f59e0b;
}

/* Confidence Bar */
.confidence-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 1rem;
    max-width: 200px;
}

.confidence-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.confidence-fill.ai {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.confidence-fill.human {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.confidence-fill.undetermined {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

/* Result CTA */
.result-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1.5rem;
}

.result-cta p {
    margin: 0;
    font-size: 1rem;
}

.result-cta .cta-link {
    color: white;
    font-weight: 700;
    text-decoration: underline;
}

.result-cta .cta-link:hover {
    opacity: 0.9;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
    font-weight: 700;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-message {
    color: #1e293b;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .guest-trial-card {
        padding: 1.5rem;
    }

    .trial-title {
        font-size: 1.5rem;
    }

    .trial-subtitle {
        font-size: 0.875rem;
    }

    .guest-trial-body {
        padding: 1.5rem;
    }

    .file-upload-zone {
        padding: 2rem 1rem;
    }

    .result-verdict {
        padding: 1.5rem;
    }

    .verdict-text {
        font-size: 1.25rem;
    }

    .verdict-confidence {
        font-size: 1.75rem;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}
