:root {
    --primary-color: #00f2ea;
    --secondary-color: #ff0055;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.2);
    --glow-color: rgba(0, 242, 234, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, var(--glow-color) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 0, 85, 0.08) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.icon {
    font-size: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.upload-section {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.upload-section:hover, .upload-section.drag-over {
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 242, 234, 0.2);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.upload-section:hover .upload-icon {
    transform: scale(1.1) rotate(5deg);
}

.upload-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.upload-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.4);
}

.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.btn-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: rgba(255, 0, 85, 0.8);
}

.action-section {
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.5s ease-out;
}

.btn-analyze {
    background: linear-gradient(135deg, var(--primary-color), #00c2bb);
    color: #0f172a;
    border: none;
    padding: 1rem 3rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0, 242, 234, 0.3);
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 242, 234, 0.5);
}

.btn-analyze:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.result-section {
    animation: fadeInUp 0.5s ease-out;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.result-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.markdown-body {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
}

.markdown-body strong {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .container { padding: 1rem; }
}
