/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e0e0;
    padding: 20px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.header p {
    color: #aaa;
    font-size: 1.1rem;
}

/* ===== CARDS ===== */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #00d2ff;
    border-bottom: 1px solid rgba(0, 210, 255, 0.2);
    padding-bottom: 10px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

.form-group small {
    color: #888;
    font-size: 0.85rem;
    display: block;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-field:focus {
    border-color: #00d2ff;
    background: rgba(0, 210, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}

.input-field::placeholder {
    color: #666;
}

.input-small {
    width: auto;
    min-width: 120px;
}

input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #00d2ff;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ===== PROGRESS ===== */
.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    height: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    border-radius: 50px;
    transition: width 0.5s ease;
    width: 0%;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #00d2ff;
}

.stat-label {
    font-size: 0.85rem;
    color: #888;
}

.status-msg {
    text-align: center;
    color: #aaa;
    font-style: italic;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

/* ===== LOG ===== */
.log-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-thumb {
    background: #00d2ff;
    border-radius: 3px;
}

.log-item {
    padding: 5px 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    border-left: 3px solid;
}

.log-item.info {
    border-color: #00d2ff;
    background: rgba(0, 210, 255, 0.05);
    color: #9de0f5;
}

.log-item.success {
    border-color: #38ef7d;
    background: rgba(56, 239, 125, 0.05);
    color: #9dfbc4;
}

.log-item.warning {
    border-color: #f7971e;
    background: rgba(247, 151, 30, 0.05);
    color: #fcd49a;
}

.log-item.error {
    border-color: #ff416c;
    background: rgba(255, 65, 108, 0.05);
    color: #ffaab8;
}

/* ===== RESULTS TABLE ===== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
}

#resultsTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

#resultsTable thead tr {
    background: rgba(0, 210, 255, 0.15);
}

#resultsTable th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #00d2ff;
    white-space: nowrap;
}

#resultsTable td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ddd;
    vertical-align: top;
}

#resultsTable tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

#resultsTable tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.price-cell {
    color: #38ef7d;
    font-weight: 700;
    white-space: nowrap;
}

.link-cell a {
    color: #00d2ff;
    text-decoration: none;
    font-size: 0.85rem;
    word-break: break-all;
}

.link-cell a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}