/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light mode colors - Fun and vibrant */
    --bg-primary: #f8f9ff;
    --bg-secondary: #f0f2ff;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --accent-primary: #ff6b9d;
    --accent-secondary: #ff8e53;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow-color: rgba(102, 126, 234, 0.1);
    --focus-color: #667eea;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode colors - Fun and vibrant */
        --bg-primary: #0f0f23;
        --bg-secondary: #1a1a2e;
        --bg-gradient-start: #2d1b69;
        --bg-gradient-end: #1a1a2e;
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-light: #a0aec0;
        --accent-primary: #ff8e53;
        --accent-secondary: #ff6b9d;
        --border-color: #2d3748;
        --card-bg: #16213e;
        --shadow-color: rgba(255, 107, 157, 0.2);
        --focus-color: #4ecdc4;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

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

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.description {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Main content */
.main-content {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
    overflow: hidden;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.form-container {
    padding: 2.5rem;
}

/* Form styles */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.help-text {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results section */
.results-container {
    padding: 2.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.results-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.results-grid {
    display: grid;
    gap: 1rem;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.result-number {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.result-stats {
    font-size: 0.875rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.result-numbers {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    word-break: break-all;
    line-height: 1.4;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.copy-btn:hover {
    background-color: var(--border-color);
    color: var(--accent-primary);
}

.copy-btn.copied {
    color: #4ecdc4;
}

.copy-btn svg {
    display: block;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer .credit {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer .credit a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer .credit a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .form-container,
    .results-container {
        padding: 1.5rem;
    }

    .hero {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }

    .form-container,
    .results-container {
        padding: 1rem;
    }
}

/* Loading state */
.btn-loading {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loading {
    display: inline;
}