/* ================================================
   Cruza2TV - Components
   Buttons, Cards, Glass, Forms, Modals, Animations
   ================================================ */

/* === Glass Effects === */
.glass {
    background: hsl(0 0% 100% / 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid hsl(0 0% 100% / 0.2);
}

.glass-dark {
    background: hsl(215 65% 18% / 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid hsl(0 0% 100% / 0.1);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 4px 20px hsl(0 85% 45% / 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: hsl(0 85% 40%);
    box-shadow: 0 6px 30px hsl(0 85% 45% / 0.4);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid hsl(0 0% 100% / 0.8);
    color: white;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: hsl(0 0% 100% / 0.1);
}

/* === Gradient Text === */
.gradient-text {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Cards === */
.card {
    background: hsl(var(--card));
    border-radius: 1rem;
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-elevated);
}

/* === Section Backgrounds === */
.section-beige {
    background-color: hsl(var(--secondary));
}

.section-gray {
    background-color: hsl(var(--muted));
}

.section-dark {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* === Decorative === */
.decorative-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(60px);
    background: var(--gradient-red);
    pointer-events: none;
}

/* === Form Inputs === */
.input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    background: hsl(var(--muted));
    border: 2px solid transparent;
    outline: none;
    font-size: 1rem;
    color: hsl(var(--foreground));
    transition: all 0.3s ease;
    font-family: inherit;
}

.input:focus {
    border-color: hsl(var(--primary));
    background: hsl(var(--background));
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
    opacity: 0.6;
}

.input-glass {
    background: hsl(0 0% 100% / 0.1);
    border: 1px solid hsl(0 0% 100% / 0.2);
    color: white;
}

.input-glass::placeholder {
    color: hsl(0 0% 100% / 0.6);
}

.input-glass:focus {
    border-color: hsl(0 0% 100% / 0.4);
    background: hsl(0 0% 100% / 0.15);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: hsl(var(--muted));
    border: 2px solid transparent;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: hsl(var(--primary));
    background: hsl(var(--background));
}

.form-input::placeholder {
    color: hsl(var(--muted-foreground) / 0.5);
}

.form-textarea {
    min-height: 180px;
    resize: none;
}

/* Form validation states */
.form-input.error {
    border-color: hsl(0, 85%, 50%);
    background: hsl(0, 85%, 97%);
}

.form-input.success {
    border-color: hsl(142, 71%, 45%);
}

.form-error-message {
    font-size: 0.75rem;
    color: hsl(0, 85%, 50%);
    margin-top: 0.25rem;
    display: none;
}

.form-error-message.visible {
    display: block;
}

/* === Animations === */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-bounce {
    animation: bounce 1.5s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* === Modal === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: hsl(var(--accent) / 0.8);
    backdrop-filter: blur(8px);
}

.modal.open {
    display: flex;
}

.modal-content {
    background: hsl(var(--card));
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: var(--shadow-elevated);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    color: hsl(var(--muted-foreground));
    transition: color 0.3s;
}

.modal-close:hover {
    color: hsl(var(--foreground));
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.modal-desc {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.modal-checkbox input {
    margin-top: 0.25rem;
    width: 1rem;
    height: 1rem;
    accent-color: hsl(var(--primary));
}

.modal-checkbox label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.modal-submit {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

/* === SVG Icons === */
.icon {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-lg {
    width: 1.5rem;
    height: 1.5rem;
}

/* === Loading Spinner === */
.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid hsl(0 0% 100% / 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* === Toast Notification === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    z-index: 200;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
    max-width: 24rem;
    box-shadow: var(--shadow-elevated);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: hsl(142, 71%, 35%);
}

.toast.error {
    background: hsl(0, 85%, 45%);
}

.toast.info {
    background: hsl(215, 65%, 30%);
}

/* === Ad Slot Placeholder === */
.ad-slot {
    background: hsl(var(--muted));
    border: 2px dashed hsl(var(--border));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    min-height: 90px;
    text-align: center;
    padding: 1rem;
}