:root {
    --bg-color: #0b0c10;
    --text-primary: #f8f9fa;
    --text-secondary: #9ca3af;
    --accent: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --danger: #ff4757;
    --success: #2ed573;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic Background Orbs */
.background-orbs {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, #3a1c71 0%, transparent 70%);
}

.orb-2 {
    bottom: -20%; right: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, #00d2ff 0%, transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%; left: 50%;
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, #d76d77 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.crawler-card {
    margin-bottom: 3rem;
    animation: slideUp 0.8s ease-out 0.2s both;
}

.crawler-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }
}

input[type="url"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input[type="url"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

button {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loader */
.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.hidden {
    display: none !important;
}

#status-message {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 1rem;
    background: rgba(0,0,0,0.2);
}

#status-message.success { color: var(--success); border-left: 3px solid var(--success); }
#status-message.error { color: var(--danger); border-left: 3px solid var(--danger); }
#status-message.info { color: var(--accent); border-left: 3px solid var(--accent); }

/* Results Section */
.results-section {
    animation: slideUp 0.8s ease-out 0.4s both;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    min-width: auto;
    border-radius: 8px;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.1);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.result-card-header {
    height: 140px;
    background: rgba(0, 0, 0, 0.4);
    position: relative;
}

.result-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.result-card:hover .result-card-header img {
    opacity: 1;
}

.result-card-body {
    padding: 1.5rem;
    flex: 1;
}

.result-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
}

.result-card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.result-card-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.badge {
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.links-footer {
    margin-top: 4rem;
    text-align: center;
    animation: fadeIn 1s ease 1s both;
}

.glass-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.glass-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-right: 2rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    word-break: break-all;
}

.download-btn {
    background: linear-gradient(135deg, #2ed573, #1e90ff);
    border: none;
}

.download-btn:hover {
    background: linear-gradient(135deg, #1e90ff, #2ed573);
}

.pages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-info h4 {
    margin-bottom: 0.3rem;
    word-break: break-all;
    font-size: 1.1rem;
}

.page-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

.page-actions .glass-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Make result cards clickable */
.result-card.clickable {
    cursor: pointer;
}

