/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-background: hsl(220, 25%, 98%);
    --color-foreground: hsl(220, 15%, 15%);
    --color-card: hsl(0, 0%, 100%);
    --color-muted-foreground: hsl(220, 10%, 45%);
    --color-border: hsl(220, 15%, 90%);
    --color-primary: hsl(200, 95%, 50%);
    --color-primary-hover: hsl(200, 95%, 45%);
    --color-accent: hsl(180, 90%, 55%);
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, hsl(200, 95%, 50%), hsl(180, 90%, 55%));
    --gradient-card: linear-gradient(180deg, hsl(0, 0%, 100%), hsl(220, 25%, 99%));
    
    /* Shadows */
    --shadow-card: 0 4px 20px -2px rgba(14, 165, 233, 0.1);
    --shadow-button: 0 4px 14px -2px rgba(14, 165, 233, 0.3);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-background);
    color: var(--color-foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    flex: 1;
}

/* Hero Section */
.hero-content {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
    padding: 5rem 0;
}

.hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 1rem;
    background: var(--gradient-hero);
    box-shadow: var(--shadow-button);
    margin-bottom: 2rem;
    color: white;
}

.hero-text {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.gradient-text {
    display: block;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-muted-foreground);
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.5;
}

/* URL Form */
.url-form {
    max-width: 60rem;
    margin: 2rem auto;
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--color-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
}

.url-input {
    flex: 1;
    height: 3.5rem;
    font-size: 1.125rem;
    padding: 0 1rem;
    border: none;
    background: transparent;
    outline: none;
    color: var(--color-foreground);
}

.url-input::placeholder {
    color: var(--color-muted-foreground);
}

.count-input {
    width: 10rem;
    height: 3.5rem;
    font-size: 1.125rem;
    padding: 0 1rem;
    border: none;
    background: transparent;
    outline: none;
    color: var(--color-foreground);
    text-align: center;
}

.count-input::placeholder {
    color: var(--color-muted-foreground);
}

.submit-button {
    height: 3.5rem;
    padding: 0 2rem;
    background: var(--gradient-hero);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.submit-button:hover {
    opacity: 0.9;
}

.submit-button:active {
    transform: scale(0.98);
}

.form-note {
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
    margin-top: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 80rem;
    margin: 8rem auto 0;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.feature-icon-primary {
    background: rgba(14, 165, 233, 0.1);
    color: var(--color-primary);
}

.feature-icon-accent {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-accent);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--color-muted-foreground);
    line-height: 1.5;
}

/* Footer */
.footer {
    border-top: 1px solid var(--color-border);
    margin-top: 8rem;
}

.footer-text {
    text-align: center;
    color: var(--color-muted-foreground);
    padding: 2rem 1rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    min-width: 300px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .submit-button {
        width: 100%;
    }
    
    .features-grid {
        margin-top: 4rem;
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1025px) {
    .hero-title {
        font-size: 4.5rem;
    }
}
