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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #1a202c;
    line-height: 1.6;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

h1 {
    color: #2d3748;
    font-size: 1.8rem;
}

h1:before {
    content: "🐻 ";
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #edf2f7;
    color: #4a5568;
    text-decoration: none;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover {
    background: #2c5282;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    color: white;
    margin: 2rem 0;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.char-counter {
    text-align: right;
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.25rem;
}

.card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h3 {
    color: #2d3748;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.card h3:first-child {
    margin-top: 0;
}

.disclaimer {
    background: #fef5e7;
    border-left: 4px solid #ecc94b;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.error {
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #fc8181;
}

.success {
    background: #c6f6d5;
    color: #22543d;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #9ae6b4;
}

.history-item {
    background: white;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.history-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.loader {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

.loader:after {
    content: " ⚙️";
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

@media (max-width: 640px) {
    .container { padding: 1rem; }
    .hero h2 { font-size: 1.5rem; }
    h1 { font-size: 1.4rem; }
}

form {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    font-size: 1rem;
}

form button {
    width: 100%;
    padding: 0.75rem;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
}

form button:hover {
    background: #2c5282;
}

#message {
    margin-top: 1rem;
    text-align: center;
}
