/* Custom Styles */
:where([class^="ri-"])::before {
    content: "\f3c2";
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.dice-pattern {
    background-image: url("assets/dice-cards-bg.jpg");
    background-color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.dark .dice-pattern {
    background-image: url("assets/dice-cards-bg-dark.png");
    background-color: blacks;
}

.dice-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.90);
    z-index: -1;
}

.dark .dice-pattern::before {
    background: rgba(0, 0, 0, 0.85);
}

.floating-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .floating-card {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.floating-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.dark .floating-card:hover {
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.15);
}

input:focus {
    outline: none;
    border-color: #FF3B30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.cta-button:hover {
    background-image: linear-gradient(to right, #FF3300, #FF9E00);
    filter: brightness(0.9);
    transform: translateY(-1px);
}

/* Micro Animations */
.social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
    opacity: 0.7;
    transform: scale(1.1) rotate(5deg);
}

.ri-rocket-line, .ri-arrow-right-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button:hover .ri-rocket-line {
    transform: translateX(-2px) rotate(-10deg);
}

.cta-button:hover .ri-arrow-right-line {
    transform: translateX(2px);
}

.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Logo animation */
.logo-container img {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container:hover img {
    transform: scale(1.05);
}

/* Input styling - ensure proper colors */
input[type="email"] {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
}

.dark input[type="email"] {
    background-color: #1f2937 !important;
    color: #ffffff !important;
    border-color: #4b5563 !important;
}

/* Input focus animation */
input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus {
    outline: none;
    border-color: #FF3B30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
    transform: scale(1.02);
}

/* Phone mockup animation */
.phone-mockup {
    animation: phoneFloat 8s ease-in-out infinite;
}

@keyframes phoneFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(-10px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

/* Gradient text animation */
.gradient-text {
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Ensure proper text colors in light mode */
h2, h3, h4 {
    color: inherit;
}

/* Dark mode toggle button animations */
#darkModeToggle {
    backdrop-filter: blur(10px);
    background: transparent !important;
    border: none;
}

#darkModeToggle:hover {
    transform: scale(1.05);
    background: transparent !important;
}

.dark #darkModeToggle:hover {
    background: transparent !important;
}

/* Dark mode toggle icon animations */
#sunIcon, #moonIcon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sunIcon:hover {
    transform: rotate(15deg);
}

#moonIcon:hover {
    transform: rotate(-15deg);
}

/* Dark mode specific styles */
.dark input::placeholder {
    color: rgba(156, 163, 175, 0.7);
}

.dark .cta-button:hover {
    filter: brightness(1.1);
}

/* Ensure proper text colors */
.text-black {
    color: #000000 !important;
}

.dark .text-black {
    color: #ffffff !important;
}

.text-gray-800 {
    color: #1f2937 !important;
}

.dark .text-gray-800 {
    color: #e5e7eb !important;
}

.text-gray-600 {
    color: #4b5563 !important;
}

.dark .text-gray-600 {
    color: #d1d5db !important;
}

.text-gray-500 {
    color: #6b7280 !important;
}

.dark .text-gray-500 {
    color: #9ca3af !important;
}

.text-gray-400 {
    color: #9ca3af !important;
}

.dark .text-gray-400 {
    color: #6b7280 !important;
}

/* Dark mode toggle button animations */
#darkModeToggle {
    backdrop-filter: blur(10px);
}

#darkModeToggle:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Smooth transitions for all dark mode changes */
.dark * {
    transition: all 0.3s ease;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
    /* Animations are now enabled on mobile devices */
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .dice-pattern {
        background-attachment: fixed;
    }
    
    .floating-card {
        position: relative !important;
        margin: 1rem 0;
        width: 100% !important;
        max-width: 300px;
    }
    
    /* Mobile layout improvements */
    .flex-col {
        gap: 0;
    }
    
    /* Reduce spacing on mobile */
    .space-y-6 > * + * {
        margin-top: 1rem;
    }
    
    .space-y-8 > * + * {
        margin-top: 1.5rem;
    }
    
    /* Push phone mockup down on mobile */
    .phone-mockup {
        margin-top: 0 !important;
    }
    
    /* Add extra padding after logo on mobile */
    .logo-container {
        margin-bottom: 2rem !important;
    }
    
    .hero-content {
        padding: 0 1rem !important;
    }
    
    /* Fix input field z-index issues */
    input[type="email"] {
        position: relative;
        z-index: 10;
    }
    
    /* Ensure content is scrollable */
    .flex.flex-col {
        min-height: auto;
        height: auto;
    }
    
    /* Fix visual section on mobile */
    .w-full.lg\:w-\[55\%\] {
        min-height: 400px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure phone mockup is visible on mobile */
    .phone-mockup {
        margin-top: 0 !important;
        position: relative !important;
        display: block !important;
    }
    
    /* Scale down floating cards on mobile */
    .floating-card {
        position: absolute !important;
        margin: 0 !important;
        width: auto !important;
        max-width: none !important;
    }
    
    .floating-card.w-36 {
        width: 120px !important;
    }
    
    .floating-card.w-40 {
        width: 140px !important;
    }
    
    .floating-card.w-48 {
        width: 160px !important;
    }
    
    .floating-card.w-52 {
        width: 180px !important;
    }
    
    /* Scale down phone mockup on mobile */
    .phone-mockup .w-64 {
        width: 200px !important;
        height: 375px !important;
    }
    
    .phone-mockup .md\\:w-72 {
        width: 240px !important;
        height: 450px !important;
    }
    
    .phone-mockup .lg\\:w-80 {
        width: 320px !important;
        height: 600px !important;
    }
    
    /* Fix any overlapping elements */
    .toast {
        z-index: 1000;
    }
    
    #darkModeToggle {
        z-index: 1001;
    }
}

/* Toast Notifications */
.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.dark .toast {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success {
    border-left: 4px solid #10B981;
}

.toast.error {
    border-left: 4px solid #EF4444;
}

.toast.info {
    border-left: 4px solid #3B82F6;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #10B981;
}

.toast.error .toast-icon {
    color: #EF4444;
}

.toast.info .toast-icon {
    color: #3B82F6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #6B7280;
}

.dark .toast-message {
    color: #9CA3AF;
}

.toast-close {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #6B7280;
}

.dark .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #D1D5DB;
}

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

.toast.slide-out {
    transform: translateX(100%);
    opacity: 0;
}

/* Loading animation for submit button */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Button disabled state */
.cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* General transitions */
* {
    transition: all 0.2s ease;
}
