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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: white;
    position: relative;
    overflow-x: hidden;
}

/* Background decorations - mobile optimized */
.floating-envelope {
    position: absolute;
    font-size: 1.2rem;
    color: rgba(138, 132, 255, 0.6);
    animation: floatAround 20s linear infinite;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(138, 132, 255, 0.2));
    display: none;
    /* Hidden on mobile by default */
}

.bubble {
    position: absolute;
    background: rgba(138, 132, 255, 0.1);
    border-radius: 50%;
    animation: bubbleFloat 10s ease-in-out infinite;
    z-index: 1;
    display: none;
    /* Hidden on mobile by default */
}

/* Show background elements on larger screens */
@media (min-width: 768px) {
    .floating-envelope {
        display: block;
        font-size: 1.5rem;
        animation-duration: 15s;
    }

    .bubble {
        display: block;
        animation-duration: 8s;
    }
}

.envelope-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.envelope-2 {
    top: 20%;
    right: 8%;
    animation-delay: 3s;
}

.bubble-1 {
    width: 60px;
    height: 60px;
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 90px;
    height: 90px;
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -15px) rotate(5deg);
    }

    50% {
        transform: translate(-15px, -25px) rotate(-5deg);
    }

    75% {
        transform: translate(-20px, -10px) rotate(3deg);
    }

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

@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0px) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.5;
    }
}

.container {
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8A84FF;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.form-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #8A84FF, #6C63FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header p {
    color: #b8b8d0;
    font-size: 1rem;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(138, 132, 255, 0.4);
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #8A84FF;
    background: rgba(138, 132, 255, 0.15);
    box-shadow: 0 0 30px rgba(138, 132, 255, 0.3);
}

.form-control::placeholder {
    color: #b8b8d0;
    font-style: italic;
}

/* Title Suggestions Section */
.title-suggestions {
    margin-bottom: 25px;
}

.suggestions-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 1rem;
}

.suggestions-subtitle {
    color: #b8b8d0;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.suggestion-cards-container {
    position: relative;
    margin-bottom: 20px;
}

.suggestion-cards {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    scrollbar-width: thin;
    scrollbar-color: #8A84FF rgba(255, 255, 255, 0.1);
    -webkit-overflow-scrolling: touch;
}

.suggestion-cards::-webkit-scrollbar {
    height: 6px;
}

.suggestion-cards::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.suggestion-cards::-webkit-scrollbar-thumb {
    background: #8A84FF;
    border-radius: 3px;
}

.suggestion-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: 250px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-card:hover {
    transform: translateY(-3px);
    background: rgba(138, 132, 255, 0.1);
    border-color: rgba(138, 132, 255, 0.4);
}

.suggestion-card.selected {
    background: rgba(138, 132, 255, 0.15);
    border-color: #8A84FF;
    box-shadow: 0 8px 25px rgba(138, 132, 255, 0.3);
}

.suggestion-card .checkmark {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #8A84FF;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-card.selected .checkmark {
    opacity: 1;
}

.suggestion-text {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #e0e0e0;
    text-align: center;
}

.custom-title-option {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.toggle-text {
    margin-left: 10px;
    color: #8A84FF;
    font-weight: 600;
    font-size: 0.95rem;
}

.custom-input-container {
    display: none;
    animation: slideDown 0.3s ease;
}

.custom-input-container.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    background: rgba(138, 132, 255, 0.1);
    border-color: rgba(138, 132, 255, 0.4);
}

.checkbox-group input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #8A84FF;
    border-radius: 6px;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-group input[type="checkbox"]:checked+.checkbox-custom {
    background: #8A84FF;
}

.checkbox-group input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.checkbox-label {
    flex: 1;
    cursor: pointer;
}

.checkbox-title {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 5px;
}

.checkbox-description {
    color: #b8b8d0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn {
    padding: 16px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #6C63FF, #8A84FF);
    color: white;
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-primary.loading i {
    animation: spin 1s linear infinite;
}

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

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

/* Success State */
.success-state {
    display: none;
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.6s ease;
}

.success-state.active {
    display: block;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #4ECDC4, #8A84FF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    animation: successBounce 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes successBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4ECDC4, #8A84FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-message {
    color: #b8b8d0;
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.page-url-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 15px;
    margin: 25px 0;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.url-label {
    font-size: 0.9rem;
    color: #b8b8d0;
    margin-bottom: 8px;
}

.page-url {
    font-size: 1rem;
    color: #8A84FF;
    word-break: break-all;
    font-family: monospace;
}

.copy-button {
    background: rgba(138, 132, 255, 0.1);
    color: #8A84FF;
    border: 1px solid #8A84FF;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: #8A84FF;
    color: white;
}

/* CTA Section */
.cta-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    margin-top: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: slideInUp 0.6s ease 0.3s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.cta-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.cta-subtitle {
    color: #b8b8d0;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cta-button {
    background: transparent;
    color: #8A84FF;
    border: 2px solid #8A84FF;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cta-button:hover {
    background: #8A84FF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 132, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }

    .form-container {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .suggestion-card {
        width: 220px;
        min-height: 90px;
    }

    .btn {
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }

    .form-container {
        padding: 25px 15px;
    }

    .checkbox-group {
        padding: 15px;
    }

    .suggestion-card {
        width: 200px;
        min-height: 85px;
        padding: 15px;
    }

    .success-title {
        font-size: 1.5rem;
    }
}