@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700;900&display=swap');

/* ========== BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

/* ========== BACKGROUND SHAPES ========== */
.shape {
    position: absolute;
    border: 4px solid rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    bottom: 5%;
    left: 10%;
    border-radius: 50%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(251, 191, 36, 0.1));
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(147, 51, 234, 0.1));
    bottom: 10%;
    left: 50%;
    border-radius: 20px;
    animation-delay: 4s;
}

/* ========== LOGO & HEADER ========== */
.logo-text {
    background: linear-gradient(135deg, #4f46e5 0%, #ec4899 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

/* ========== CARDS ========== */
.shadow-brutal {
    box-shadow: 8px 8px 0px 0px rgba(17, 24, 39, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadow-brutal:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0px 0px rgba(17, 24, 39, 1);
}

.generator-card,
.preview-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

/* ========== INPUTS & SELECTS ========== */
.input-field {
    box-shadow: 4px 4px 0px 0px rgba(17, 24, 39, 1);
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #1f2937;
    font-weight: 500;
    font-size: 1rem;
}

.input-field:focus {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 1);
}

.input-field::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.select-field {
    box-shadow: 4px 4px 0px 0px rgba(17, 24, 39, 1);
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #1f2937;
    font-weight: 600;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%231f2937' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.select-field:hover {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0px 0px rgba(0, 0, 0, 1);
}

/* ========== COLOR PICKER ========== */
.color-picker {
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0px 0px rgba(17, 24, 39, 1);
}

.color-picker:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px rgba(17, 24, 39, 1);
}

.color-preset {
    width: 40px;
    height: 40px;
    border: 3px solid #1f2937;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px 0px rgba(17, 24, 39, 1);
}

.color-preset:hover {
    transform: translate(-2px, -2px) scale(1.1);
    box-shadow: 4px 4px 0px 0px rgba(17, 24, 39, 1);
}

.color-preset:active {
    transform: translate(0px, 0px) scale(1);
    box-shadow: 1px 1px 0px 0px rgba(17, 24, 39, 1);
}

/* ========== BUTTONS ========== */
.generate-btn {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    box-shadow: 6px 6px 0px 0px rgba(17, 24, 39, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px 0px rgba(17, 24, 39, 1);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.generate-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px rgba(17, 24, 39, 1);
}

.download-btn {
    box-shadow: 5px 5px 0px 0px rgba(17, 24, 39, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px 0px rgba(17, 24, 39, 1);
    background: linear-gradient(135deg, #d946ef 0%, #f472b6 100%);
}

.download-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px rgba(17, 24, 39, 1);
}

.copy-btn {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    box-shadow: 4px 4px 0px 0px rgba(17, 24, 39, 1);
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px rgba(17, 24, 39, 1);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.copy-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px 0px rgba(17, 24, 39, 1);
}

/* ========== LOADING SPINNER ========== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* ========== QR CODE CONTAINER ========== */
.qr-container {
    min-width: 280px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qr-container canvas {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    animation: fadeIn 0.5s ease-out;
}

.placeholder-content {
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

.placeholder-icon {
    font-size: 4rem;
    line-height: 1;
    filter: grayscale(1);
    opacity: 0.3;
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1f2937;
    color: white;
    padding: 1rem 1.5rem;
    border: 4px solid #000;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
    font-weight: 600;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.toast.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ========== FOOTER ========== */
footer .shadow-brutal {
    display: inline-block;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .logo-text {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 2.5rem;
    }

    .shadow-brutal {
        box-shadow: 4px 4px 0px 0px rgba(17, 24, 39, 1);
    }

    .shadow-brutal:hover {
        box-shadow: 6px 6px 0px 0px rgba(17, 24, 39, 1);
    }

    .input-field,
    .select-field {
        font-size: 0.95rem;
    }

    .color-preset {
        width: 36px;
        height: 36px;
    }

    .qr-container {
        min-width: 220px;
        min-height: 220px;
    }

    .placeholder-icon {
        font-size: 3rem;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: 100%;
    }

    .shape {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 2rem;
    }

    .generator-card,
    .preview-card {
        padding: 1.25rem !important;
    }

    .input-field,
    .select-field {
        padding: 0.75rem !important;
        font-size: 0.9rem;
    }

    .generate-btn,
    .download-btn {
        padding: 0.875rem !important;
        font-size: 1rem !important;
    }

    .color-picker {
        width: 60px;
        height: 60px;
    }

    .color-preset {
        width: 32px;
        height: 32px;
    }
}