:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -100px;
    left: -100px;
}

.blob-2 {
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: #3b82f6;
    opacity: 0.1;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 50px) scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

.model-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

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

select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    color: white;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

select:focus {
    border-color: var(--primary);
}

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

input[type="url"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="url"]:focus {
    border-color: var(--primary);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

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

button:active {
    transform: scale(0.98);
}

.hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.result-section.hidden,
.loader.hidden {
    display: none;
}

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

.summary-content {
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
}

.educational-note h3 {
    color: #fbd38d;
    margin-bottom: 1rem;
}

.educational-note p {
    color: var(--text-muted);
    line-height: 1.6;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#copy-btn {
    background: transparent;
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--text-muted);
}

#copy-btn:hover {
    background: var(--glass-bg);
    color: white;
}

footer {
    margin-top: auto;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

    h1 {
        font-size: 2.5rem;
    }
}
