/* Professional Comparison Styles */
.gif-ads-comparison-professional {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 25px 0;
    border: 1px solid #e1e8ed;
}

/* Professional Table */
.comparison-table-section {
    margin: 0;
}

.table-container {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.performance-table th {
    background: #2c3e50;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.performance-table tr:hover {
    background: #f8f9fa;
}

.ad-name {
    font-weight: 600;
    color: #2c3e50;
}

.table-preview {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 1px solid #ddd;
}

.table-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-preview .preview-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;
    color: white;
    font-size: 10px;
}

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

.metric-value {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ctr-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.ctr-indicator.high {
    background: #d4edda;
    color: #155724;
}

.ctr-indicator.medium {
    background: #fff3cd;
    color: #856404;
}

.ctr-indicator.low {
    background: #f8d7da;
    color: #721c24;
}

.performance-score {
    text-align: center;
}

.score-circle {
    display: inline-block;
}

/* Professional Summary */
.gif-ads-summary-professional {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 25px 0;
    border: 1px solid #e1e8ed;
}

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

.summary-header h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.8em;
    font-weight: 600;
}

.period {
    color: #6c757d;
    margin: 0;
    font-size: 0.95em;
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.summary-metric-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

.summary-metric-card:hover {
    transform: translateY(-3px);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.metric-icon {
    font-size: 1.5em;
}

.metric-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1em;
}

.summary-metric-card .metric-value {
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.metric-description {
    color: #6c757d;
    font-size: 0.9em;
}

.summary-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.9em;
}

/* Lightbox Styles */
.gif-ad-lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

.close-lightbox {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0,0,0,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-lightbox:hover {
    color: #000;
    background: rgba(0,0,0,0.2);
}

.lightbox-header {
    padding: 20px 30px 0;
}

.lightbox-header h3 {
    margin: 0;
    color: #2c3e50;
}

.lightbox-body {
    padding: 20px 30px;
    text-align: center;
}

.lightbox-body img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.lightbox-footer {
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.btn-primary {
    background: #3498db;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-bottom: 10px;
}

.btn-primary:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.url-display {
    color: #6c757d;
    font-size: 0.9em;
    margin: 0;
    word-break: break-all;
}

/* Error States */
.gif-ad-stats-error,
.gif-ads-summary-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
    .performance-table {
        font-size: 0.9em;
    }
    
    .performance-table th,
    .performance-table td {
        padding: 10px 8px;
    }
    
    .summary-metrics {
        grid-template-columns: 1fr;
    }
    
    .lightbox-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .gif-ads-comparison-professional,
    .gif-ads-summary-professional {
        padding: 20px;
    }
}

/* Frontend Analytics Styles */
.gif-ads-frontend-analytics {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.gif-ads-frontend-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.gif-ads-frontend-stat {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.gif-ads-frontend-stat .stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.gif-ads-frontend-stat .stat-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .gif-ads-frontend-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .gif-ads-frontend-stat {
        min-width: auto;
    }
}