/* Domain Analyzer Pro - Modern Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00d4ff;
    --secondary: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --light: #f1f5f9;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text);
    min-height: 100vh;
    direction: rtl;
}

/* Header */
.header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.header-title h1 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

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

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.stat-card.blue .stat-value { color: var(--primary); }
.stat-card.green .stat-value { color: var(--success); }
.stat-card.orange .stat-value { color: var(--warning); }
.stat-card.purple .stat-value { color: var(--secondary); }

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-group textarea {
    width: 100%;
    min-height: 200px;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text);
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 0.8rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 2px solid var(--danger);
}

/* Progress */
.progress-container {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.progress-container.active {
    display: block;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.progress-bar {
    background: rgba(15, 23, 42, 0.5);
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: width 0.3s ease;
}

/* Results Cards */
.results-container {
    display: grid;
    gap: 1.5rem;
}

.domain-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

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

.domain-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.domain-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-number {
    background: rgba(124, 58, 237, 0.2);
    color: var(--secondary);
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.badge {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-high {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-low {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.card-content {
    display: grid;
    gap: 1.2rem;
}

.info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    align-items: start;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.info-value {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.6;
}

.category-tag {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.btn-details {
    margin-top: 1rem;
    background: rgba(124, 58, 237, 0.2);
    color: var(--secondary);
    border: 2px solid var(--secondary);
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 800px;
    width: 100%;
    border: 2px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.modal-close {
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: var(--danger);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    gap: 1.5rem;
}

.detail-section {
    background: rgba(15, 23, 42, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-label {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.8;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: rgba(124, 58, 237, 0.2);
    color: var(--secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
