:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-active: #3730a3;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --background-start: #eff6ff;
    --background-end: #eef2ff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-start), var(--background-end));
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 1rem;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
}

.content {
    width: 100%;
}

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary-color);
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.download-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.download-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

.download-btn:active:not(:disabled) {
    background: var(--primary-active);
}

.download-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message.error {
    background: #fef2f2;
    color: var(--error-color);
}

.message.success {
    background: #f0fdf4;
    color: var(--success-color);
}

.hidden {
    display: none;
}

.features {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.feature svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-color);
}

.feature span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ad-space {
    align-self: start;
}

.ad-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    height: 600px;
    overflow: hidden;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }

    .ad-container {
        height: 250px;
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

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