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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.container.dashboard {
    max-width: 800px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-size: 2em;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

button.secondary:hover {
    background: #f8f9ff;
}

.link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.link a:hover {
    text-decoration: underline;
}

.error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.success {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
}

/* Dashboard styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.welcome {
    color: #333;
    font-size: 1.2em;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
}

.search-box button {
    width: auto;
    padding: 12px 30px;
}

.pokemon-result {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
}

.pokemon-result img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.pokemon-name {
    font-size: 2em;
    color: #333;
    margin: 20px 0 10px;
    text-transform: capitalize;
}

.pokemon-types {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.type-badge {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    text-transform: capitalize;
}

.pokemon-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
}

.stat-name {
    color: #666;
    font-size: 0.9em;
    text-transform: capitalize;
}

.stat-value {
    color: #333;
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 5px;
}

.history {
    margin-top: 30px;
}

.history h3 {
    color: #333;
    margin-bottom: 15px;
}

.history-list {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-pokemon {
    font-weight: 600;
    color: #667eea;
    text-transform: capitalize;
}

.history-date {
    color: #999;
    font-size: 0.85em;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.2em;
}