/* Earnings Analyzer — Frontend */

.ea-analyzer {
    max-width: 700px;
    margin: 30px auto;
}

.ea-form {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.ea-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    text-align: center;
}

.ea-subtitle {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin: 0 0 24px;
}

.ea-input-group {
    display: flex;
    gap: 8px;
}

.ea-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background: #f8f8f8;
    cursor: pointer;
    min-width: 140px;
}

.ea-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.ea-input:focus {
    border-color: #667eea;
    outline: none;
}

.ea-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.ea-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.ea-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.ea-loader {
    text-align: center;
    padding: 40px;
}

.ea-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: ea-spin 0.8s linear infinite;
}

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

/* Result Card */
.ea-result {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-top: 20px;
    animation: ea-fadeIn 0.4s ease;
}

@keyframes ea-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ea-result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ea-result-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.ea-result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ea-result-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
}

.ea-result-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.ea-result-platform {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 2px;
}

.ea-result-body {
    padding: 24px 28px;
}

.ea-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ea-stat {
    text-align: center;
    padding: 16px 8px;
    background: #f8f9fa;
    border-radius: 12px;
}

.ea-stat-num {
    font-size: 22px;
    font-weight: 800;
    color: #333;
}

.ea-stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ea-income-section {
    margin-bottom: 20px;
}

.ea-income-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.ea-income-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.ea-income-row:last-child {
    border-bottom: none;
}

.ea-income-label {
    font-size: 14px;
    color: #555;
}

.ea-income-value {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.ea-income-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 12px;
    color: #fff;
}

.ea-income-total .ea-income-label {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.ea-income-total .ea-income-value {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.ea-disclaimer {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

.ea-error {
    padding: 20px;
    background: #fff5f5;
    border: 1px solid #fcc;
    border-radius: 12px;
    color: #c33;
    text-align: center;
    font-size: 14px;
}

/* Videos list */
.ea-videos {
    margin-top: 20px;
}

.ea-videos-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0 0 12px;
}

.ea-video-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.ea-video-item:last-child {
    border-bottom: none;
}

.ea-video-thumb {
    width: 80px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.ea-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ea-video-info {
    flex: 1;
    min-width: 0;
}

.ea-video-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 2px;
}

.ea-video-views {
    font-size: 12px;
    color: #999;
}

@media (max-width: 600px) {
    .ea-input-group { flex-direction: column; }
    .ea-select { min-width: 100%; }
    .ea-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .ea-result-header { flex-direction: column; text-align: center; }
}
