:root {
    --primary: #0066ff;
    --primary-hover: #0052cc;
    --bg: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --error: #ef4444;
    --success: #22c55e;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

header {
    background: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

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

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--text);
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.downloader-box {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.input-group input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    outline: none;
    border-radius: 8px;
}

.input-group button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    min-width: 140px;
}

.input-group button:hover {
    background: var(--primary-hover);
}

.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

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

.error-message {
    color: var(--error);
    margin-top: 1rem;
    font-size: 0.875rem;
    display: none;
}

.result-box {
    max-width: 700px;
    margin: 0 auto;
    animation: slideUp 0.3s ease-out;
}

.hidden {
    display: none;
}

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

.file-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.file-thumb {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.file-details h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-details p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

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

.btn-secondary {
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn:hover {
    opacity: 0.9;
}

.info-section {
    padding: 4rem 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
}

.disclaimer {
    background: #fef2f2;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #fee2e2;
    margin-bottom: 4rem;
}

.disclaimer h4 {
    color: #991b1b;
    margin-bottom: 0.5rem;
}

.disclaimer p {
    font-size: 0.875rem;
    color: #b91c1c;
}

footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .hero h1 { font-size: 2rem; }
    .input-group { flex-direction: column; background: transparent; box-shadow: none; border: none; padding: 0; }
    .input-group input { background: var(--white); border: 1px solid var(--border); margin-bottom: 0.5rem; }
    .file-info { flex-direction: column; text-align: center; }
    .action-buttons { flex-direction: column; }
}
