@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-dark {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Navbar sticky */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Hover effects */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
}

/* Button gradients */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Social icons */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Footer links */
.footer-link {
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-link:hover {
    color: #667eea;
    transform: translateX(5px);
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 8px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 16px;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s ease;
    display: block;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #667eea;
    padding-left: 20px;
}

/* Mobile dropdown */
.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown-content.active {
    max-height: 500px;
}

.chevron {
    transition: transform 0.3s ease;
}

.chevron.rotated {
    transform: rotate(180deg);
}

/* Logo gradient */
.logo-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-tab {
    transition: all 0.3s ease;
}

.step-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.step-tab.completed {
    background: #10b981;
    color: white;
}

.card-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-option.selected {
    border: 3px solid #667eea;
    background: #f0f4ff;
}

.drop-zone {
    border: 3px dashed #cbd5e1;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.drop-zone.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

.drop-zone:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3), 0 0 60px rgba(118, 75, 162, 0.2);
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.drop-zone:hover::before {
    opacity: 1;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

#editorCanvas {
    max-width: 100%;
    border-radius: 8px;
}

.cropper-container {
    max-width: 100% !important;
}

.editor-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Success Popup Styles */
.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.success-popup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 90%;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
    position: relative;
    overflow: hidden;
}

@media (max-width: 480px) {
    .success-popup {
        width: 90%;
        padding: 1.25rem;
        border-radius: 16px;
    }
}

.success-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.success-popup-content {
    position: relative;
    z-index: 1;
}

.success-icon-wrapper {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: bounceIn 0.6s ease;
}

.success-icon {
    font-size: 2rem;
    animation: checkmark 0.8s ease 0.3s;
}

@media (max-width: 480px) {
    .success-icon-wrapper {
        width: 50px;
        height: 50px;
        margin-bottom: 0.75rem;
    }

    .success-icon {
        font-size: 1.75rem;
    }
}

.success-title {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.success-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .success-title {
        font-size: 1.25rem;
    }

    .success-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
}

.success-details {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.success-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 480px) {
    .success-details {
        padding: 0.875rem;
        margin-bottom: 0.875rem;
    }

    .success-detail-item {
        padding: 0.4rem 0;
    }
}

.success-detail-item:last-child {
    border-bottom: none;
}

.success-detail-label {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.success-detail-label span {
    margin-right: 0.5rem;
}

.success-detail-value {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.success-popup-button {
    width: 100%;
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.success-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.success-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-top: 0.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {

    /* Header */
    header h1 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    header p {
        font-size: 0.875rem !important;
    }

    /* Container */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Step Tabs */
    .step-tab {
        font-size: 0.7rem !important;
        padding: 0.625rem 0.375rem !important;
        line-height: 1.2;
    }

    .step-tab span {
        display: block;
        font-size: 1rem !important;
        margin-bottom: 0.125rem;
    }

    /* Headings */
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    h3 {
        font-size: 1rem !important;
    }

    /* Cards and Sections */
    .bg-white,
    .bg-gradient-to-r {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* Grids */
    .grid {
        gap: 1rem !important;
    }

    .grid-cols-2,
    .md\\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .grid-cols-3,
    .md\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Upload Preview */
    #previewSection .flex {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    #uploadedPreview {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 1rem;
    }

    /* Buttons */
    button {
        font-size: 0.875rem !important;
    }

    .btn-primary {
        padding: 0.875rem 1rem !important;
    }

    /* Drop Zone */
    .drop-zone {
        padding: 2rem 1rem !important;
    }

    .drop-zone svg {
        height: 3rem !important;
        width: 3rem !important;
    }

    .drop-zone p {
        font-size: 0.875rem !important;
    }

    /* Card Options */
    .card-option {
        padding: 1rem !important;
    }

    .card-option .text-4xl {
        font-size: 2rem !important;
    }

    /* Resize Mode Labels */
    label.flex {
        padding: 0.75rem !important;
    }

    /* Editor Controls */
    .editor-image-wrapper img {
        max-height: 300px !important;
    }

    /* Range Inputs */
    input[type="range"] {
        height: 2rem;
    }

    /* Feature Cards */
    .flex.items-start.space-x-4 {
        flex-direction: column !important;
        space-x: 0 !important;
    }

    .flex-shrink-0 {
        margin-bottom: 0.5rem;
    }

    /* Trust Badges */
    .flex-wrap {
        gap: 1rem !important;
    }

    .flex-wrap>div {
        flex: 1 1 45% !important;
    }

    /* FAQ and Testimonials */
    .border-l-4 {
        padding-left: 0.75rem !important;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem !important;
    }

    footer p {
        font-size: 0.875rem !important;
    }

    /* Hide desktop separators */
    .hidden.md\\:block {
        display: none !important;
    }

    /* Spacing adjustments */
    .space-y-4>*+* {
        margin-top: 0.75rem !important;
    }

    .space-y-6>*+* {
        margin-top: 1rem !important;
    }

    /* Target specs display */
    .bg-blue-50 {
        padding: 0.75rem !important;
    }

    .bg-blue-50 p {
        font-size: 0.75rem !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.25rem !important;
    }

    .step-tab {
        font-size: 0.65rem !important;
        padding: 0.5rem 0.25rem !important;
    }

    .md\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .card-option h4 {
        font-size: 0.875rem !important;
    }
}