/* NewScale Styles */
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --success: #0f3460;
    --text: #eee;
    --muted: #aaa;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--secondary);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
}

.logo span {
    color: var(--text);
}

.nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav a:hover {
    background: var(--success);
}

/* Cards */
.card {
    background: var(--secondary);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: var(--accent);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--muted);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--text);
    font-size: 1em;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #c73a54;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #0a2640;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid var(--secondary);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Article List */
.article-list {
    display: grid;
    gap: 20px;
}

.article-item {
    display: flex;
    gap: 20px;
    background: var(--secondary);
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.article-item:hover {
    transform: translateX(5px);
}

.article-thumb {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: 5px;
}

.article-info {
    flex: 1;
}

.article-info h3 {
    margin-bottom: 10px;
    color: var(--accent);
}

.article-meta {
    color: var(--muted);
    font-size: 0.9em;
}

/* Status Badge */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-processing {
    background: #ffa500;
    color: #000;
}

.badge-completed {
    background: #00cc66;
    color: #fff;
}

.badge-failed {
    background: #ff4444;
    color: #fff;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #004d26;
    color: #00cc66;
    border: 1px solid #00cc66;
}

.alert-error {
    background: #4d0000;
    color: #ff4444;
    border: 1px solid #ff4444;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav {
        margin-top: 15px;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-thumb {
        width: 100%;
        height: 200px;
    }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background: #333;
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85em;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 0;
    position: relative;
}

.stepper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #333;
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    position: relative;
    z-index: 2;
    background: var(--secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.step.active {
    border-color: var(--accent);
    color: var(--accent);
}

.step.completed {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.step-label {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.8em;
    color: var(--muted);
}

.step.active .step-label {
    color: var(--text);
    font-weight: bold;
}

/* Review Form */
.review-form {
    border: 2px solid var(--accent);
    padding: 30px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-out;
}

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

.analysis-box {
    background: var(--primary);
    padding: 15px;
    border-left: 4px solid var(--accent);
    margin-bottom: 20px;
    font-size: 0.9em;
    font-style: italic;
    color: var(--muted);
}

.preview-badge {
    display: inline-block;
    padding: 5px 15px;
    background: var(--accent);
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.progress-text {
    font-weight: bold;
    color: var(--accent);
    margin-top: 10px;
}