* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
h2 {
font-size: 20px;
}
body {
    background: linear-gradient(135deg, #083aff 0%, #b074ec 100%);
    min-height: 100vh;
    color: #333;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.add-meme {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.add-meme h2 {
    margin-bottom: 1rem;
    color: #5a67d8;
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

input[type="url"], input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-error {
    color: #e53e3e;
    margin-top: 0.8rem;
    font-size: 0.95rem;
    min-height: 1.4em;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.gallery h2 {
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.meme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.meme-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.meme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

.meme-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.meme-info {
    padding: 1.2rem;
}

.meme-caption {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #4a5568;
    line-height: 1.4;
}

.meme-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
}

.like-btn:hover {
    transform: scale(1.2);
}

.like-count {
    font-weight: bold;
    color: #e53e3e;
    margin-left: 0.5rem;
}

.delete-btn {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #feb2b2;
}

footer {
    text-align: center;
    padding: 2rem;
    color: white;
    opacity: 0.8;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    form {
        flex-direction: column;
    }
    
    input[type="url"], input[type="text"] {
        min-width: auto;
    }
    
    .meme-grid {
        grid-template-columns: 1fr;
    }
}