* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ea6666 0%, #a2994b 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    gap: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 25px;
    max-width: 600px;
    width: 100%;
    margin-top: auto;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5em;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#textInput {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.3s;
}

#textInput:focus {
    outline: none;
    border-color: #ea6666;
}

button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #ea6666 0%, #a26b4b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 5px rgba(234, 102, 102, 0.5);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.image-container {
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
    position: relative;
}

#catImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}

#catImage:hover {
    filter: brightness(0.95);
}

.container-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.page-footer {
    margin-top: auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
}

.page-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.page-footer a:hover {
    color: white;
}

.loading {
    color: #eab166;
    font-size: 1.2em;
    font-weight: 600;
}

.error {
    color: #ff0000;
    font-size: 1.1em;
    padding: 20px;
    text-align: center;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal { 
    background: white;
    border-radius: 12px;
    padding: 18px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    text-align: center;
}

.modal h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
}

.modal .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.modal .actions button {
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
}

.modal .close {
    margin-top: 12px;
    background: transparent;
    color: #666;
    border: 1px solid #eee;
    padding: 8px 12px;
    border-radius: 8px;
}