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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom right, #0f172a, #581c87, #0f172a);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 42rem;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    color: #e9d5ff;
}

/* Card */
.card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.image-container {
    position: relative;
}

.meme-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Meme Text */
.meme-text-container {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.meme-text-container.hidden {
    display: none;
}

.meme-text-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.meme-text {
    color: white;
    font-size: 1.125rem;
    line-height: 1.75;
    flex: 1;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.icon-button {
    background: transparent;
    border: none;
    color: #d8b4fe;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.2);
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Generate Button */
.button-container {
    padding: 1.5rem;
}

.generate-button {
    width: 100%;
    background: #9333ea;
    color: white;
    border: none;
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-button:hover:not(:disabled) {
    background: #7e22ce;
}

.generate-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 1.25rem;
    height: 1.25rem;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none;
}

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

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-button {
    flex: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #e9d5ff;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.social-button:hover {
    background: rgba(168, 85, 247, 0.2);
    color: #f3e8ff;
    border-color: rgba(168, 85, 247, 0.5);
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(233, 213, 255, 0.6);
    font-size: 0.875rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1e293b;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.toast.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .social-buttons {
        flex-direction: column;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
    }
}

.hidden {
    display: none !important;
}

.opacity-25 {
    opacity: 0.25;
}

.opacity-75 {
    opacity: 0.75;
}
