:root {
    --primary-color: #ffffff;
    /* White */
    --secondary-color: #102a43;
    /* Midnight Blue */
    --accent-color: #243b53;
    /* Lighter Midnight Blue */
    --text-color: #102a43;
    --bg-color: #f0f4f8;
    --input-bg: #ffffff;
    --border-color: #d9e2ec;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image:
        linear-gradient(rgba(16, 42, 67, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 42, 67, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Safari fixes */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ===== STEP WIZARD STYLES ===== */
.step-wizard {
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step-progress .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--secondary-color);
    color: white;
    border-color: rgba(16, 42, 67, 0.2);
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.3);
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--secondary-color);
    opacity: 1;
}

.step.completed .step-number {
    background: var(--accent-color);
    color: white;
}

.step.completed .step-label {
    color: var(--accent-color);
    opacity: 1;
}

.step-line {
    width: 60px;
    height: 3px;
    background: var(--border-color);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.step.completed + .step-line,
.step.completed ~ .step-line {
    background: var(--accent-color);
}

/* ===== EVENT TYPE CARDS ===== */
.event-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.event-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.event-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(16, 42, 67, 0.15);
}

.event-card:hover::before {
    transform: scaleX(1);
}

.event-card.selected {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(16, 42, 67, 0.03), rgba(36, 59, 83, 0.05));
    box-shadow: 0 8px 25px rgba(16, 42, 67, 0.2);
}

.event-card.selected::before {
    transform: scaleX(1);
}

.event-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.event-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.event-card-icon svg {
    width: 100%;
    height: 100%;
}

.event-card:hover .event-card-icon {
    transform: scale(1.1);
}

.event-card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.beta-tag {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(238, 90, 82, 0.3);
}

/* ===== ELITE TAG (for Moment Stack) ===== */
.elite-tag {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a2e;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.event-card.elite-card {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03), rgba(255, 179, 71, 0.05));
}

.event-card.elite-card::before {
    background: linear-gradient(135deg, #ffd700, #ffb347);
}

.event-card.elite-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.event-card.elite-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    background: none;
    width: auto;
    height: auto;
    color: #ffd700;
}

.event-card.elite-card.locked:hover {
    transform: none;
    box-shadow: none;
}

/* ===== VALENTINE TAG (for Let it be said) ===== */
.valentine-tag {
    background: linear-gradient(135deg, #e91e63, #ff1493);
    color: white;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(233, 30, 99, 0.3);
}

/* ===== VALENTINE CARD STYLING ===== */
.event-card.valentine-card {
    border-color: rgba(233, 30, 99, 0.3);
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.03), rgba(233, 30, 99, 0.05));
}

.event-card.valentine-card::before {
    background: linear-gradient(135deg, #e91e63, #ff1493);
}

.event-card.valentine-card .event-card-icon {
    color: #e91e63;
}

.event-card.valentine-card:hover {
    border-color: #e91e63;
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.2);
}

/* Shuffle button styling for Valentine messages */
.btn-shuffle-message {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    color: #c2185b;
    border: 1px solid rgba(233, 30, 99, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-shuffle-message:hover {
    background: linear-gradient(135deg, #f8bbd0, #f48fb1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
}

.btn-shuffle-message svg {
    stroke: #c2185b;
}

/* ===== ELITE IMAGE UPLOAD SECTION ===== */
.elite-image-upload-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 179, 71, 0.08));
    border: 2px dashed rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.elite-image-upload-section label {
    color: var(--secondary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.elite-image-upload-container {
    width: 100%;
}

.elite-image-dropzone {
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elite-image-dropzone:hover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.03);
}

#elite-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
}

#elite-image-placeholder svg {
    color: var(--accent-color);
    opacity: 0.6;
}

#elite-image-placeholder span {
    font-weight: 600;
    font-size: 0.95rem;
}

#elite-image-placeholder small {
    font-size: 0.75rem;
    opacity: 0.7;
    max-width: 200px;
}

#elite-image-preview-container {
    position: relative;
    display: inline-block;
}

#elite-preview-img {
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.elite-image-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff4757;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    transition: all 0.2s ease;
}

.elite-image-remove-btn:hover {
    background: #ff3344;
    transform: scale(1.1);
}

.elite-image-remove-btn svg {
    width: 14px;
    height: 14px;
}

/* ===== MOMENT STACK FORM STYLES ===== */
.moment-stack-container {
    padding: 1rem 0;
}

.stack-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.stack-header h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    margin-top: 0;
}

.stack-subtitle {
    color: var(--accent-color);
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.stack-event-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.stack-event-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(16, 42, 67, 0.1);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.event-number {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a2e;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.btn-remove-event {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-event:hover {
    background: rgba(220, 53, 69, 0.1);
}

.btn-add-event {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 179, 71, 0.15));
    border: 2px dashed #ffd700;
    border-radius: 12px;
    color: var(--secondary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
}

.btn-add-event:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 179, 71, 0.25));
    transform: translateY(-2px);
}

.btn-add-event:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.events-counter {
    text-align: center;
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* ===== MOMENT STACK ACTION BUTTONS ===== */
.moment-stack-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.moment-stack-actions .btn-share-event {
    flex: 1;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.moment-stack-actions .btn-share-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.moment-stack-actions .btn-share-event:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.moment-stack-actions .btn-reset-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(16, 42, 67, 0.05);
    color: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.moment-stack-actions .btn-reset-small:hover {
    background: rgba(16, 42, 67, 0.1);
    border-color: var(--accent-color);
}

/* Highlight shake animation for coupon input */
@keyframes highlight-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.highlight-shake {
    animation: highlight-shake 0.6s ease;
    border-color: #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

.event-card-desc {
    font-size: 0.75rem;
    color: var(--accent-color);
    opacity: 0.8;
}

/* ===== DEMO PREVIEW BAR ===== */
.demo-preview-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef4 100%);
    border-radius: 10px;
    border: 1px solid #d9e2ec;
    flex-wrap: wrap;
}

.demo-preview-label {
    font-size: 0.78rem;
    color: #486581;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.demo-link {
    font-size: 0.75rem;
    color: #102a43;
    text-decoration: none;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.demo-link:hover {
    background: #102a43;
    color: #ffffff;
    border-color: #102a43;
}

/* ===== STEP NAVIGATION BUTTONS ===== */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-back:hover {
    color: var(--secondary-color);
    transform: translateX(-4px);
}

.btn-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 42, 67, 0.3);
}

.step-navigation {
    margin-top: 1.5rem;
}

/* ===== SELECTED EVENT BADGE ===== */
.selected-event-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(16, 42, 67, 0.05), rgba(36, 59, 83, 0.08));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

#event-card-icon {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

#selected-event-name {
    flex: 1;
    font-weight: 600;
    color: var(--secondary-color);
}

.change-type-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.change-type-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ===== REVIEW SECTION ===== */
.review-section {
    background: linear-gradient(135deg, rgba(16, 42, 67, 0.03), rgba(36, 59, 83, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.review-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(217, 226, 236, 0.5);
}

.review-item:last-child {
    border-bottom: none;
}

.review-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.review-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.review-label {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 500;
}

.review-value {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* ===== LIVE QR PREVIEW ===== */
.live-qr-preview {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.live-qr-preview h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.qr-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-preview-box {
    width: 260px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* background: white; */
    border-radius: 12px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(16, 42, 67, 0.1);
    padding: 10px;
}

.qr-preview-box canvas {
    border-radius: 4px;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    opacity: 0.5;
}

.qr-placeholder span {
    font-size: 0.85rem;
    font-weight: 500;
}

.qr-color-picker-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qr-color-picker-inline label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0;
}

.color-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-options input[type="color"] {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
}

.color-preset-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.color-preset-mini:hover {
    transform: scale(1.15);
    border-color: var(--secondary-color);
}

/* ===== QR CREATION SECTION (Merged Step 2) ===== */
.qr-creation-section {
    background: linear-gradient(135deg, var(--bg-color), #e8eef4);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.qr-creation-layout {
    /* display: flex; */
    gap: 1.5rem;
    align-items: flex-start;
}

.qr-preview-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.qr-action-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.qr-action-hint {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin: 0;
    text-align: center;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--secondary-color);
    /* Safari fixes */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.15);
}

.btn-create-main {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    user-select: none; /* Prevent text selection */
}

.btn-create-main:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

.btn-create-main:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-download-ics,
.btn-download-qr,
.btn-calendar {
    background: white;
}

.btn-download-ics:hover { background: #f8fafc; }
.btn-download-qr:hover { background: #f8fafc; }
.btn-calendar:hover { background: #f8fafc; }

.btn-reset-small {
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--accent-color);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.25rem;
}

.btn-reset-small:hover {
    background: white;
    border-style: solid;
    color: var(--secondary-color);
}

.btn-share-event {
    background: linear-gradient(135deg, #059669, #10b981);
    border: none;
    color: white;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-share-event:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-share-event:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Safari compatibility fixes */
@supports (-webkit-appearance: none) {
    /* Safari specific fixes */
    body {
        -webkit-text-size-adjust: 100%;
    }

    input[type="color"] {
        -webkit-appearance: button;
        appearance: button;
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }

    button,
    .btn-action,
    .btn-create-main,
    .btn-submit {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Fix for Safari transform issues */
    .btn-action:active {
        -webkit-transform: translateY(-2px);
        transform: translateY(-2px);
    }

    /* Fix for Safari tap delay */
    button,
    a {
        -webkit-touch-callout: none;
    }

    /* Fix for Safari flexbox alignment */
    input[type="datetime-local"],
    input[type="date"],
    input[type="time"] {
        padding-right: 0.5rem;
    }
}

/* Responsive for QR creation section */
@media (max-width: 600px) {
    .qr-creation-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .qr-preview-panel {
        order: 1;
    }
    
    .qr-action-panel {
        order: 2;
        width: 100%;
    }
    
    .action-buttons-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .btn-create-main {
        grid-column: span 2;
    }
}

/* ===== CREATE BUTTON WITH LOADING ===== */
.btn-create {
    position: relative;
    overflow: hidden;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    -webkit-transform: translateX(-50%) translateY(100px);
    background: var(--secondary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(16, 42, 67, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    max-width: 90vw;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    -webkit-transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success,
.toast-error,
.toast-warning,
.toast-info {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    font-size: 0.95rem;
}

/* ===== CONFETTI ANIMATION ===== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Floating Animation Shapes - Background decorations */
.floating-shape {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    animation: float-shape 20s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.floating-shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -100px;
    animation-delay: 0s;
}

.floating-shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -50px;
    animation-delay: -5s;
}

.floating-shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 10%;
    animation-delay: -10s;
}

.floating-shape-4 {
    width: 250px;
    height: 250px;
    top: 30%;
    right: 5%;
    animation-delay: -3s;
}

.floating-shape-5 {
    width: 180px;
    height: 180px;
    bottom: 10%;
    right: 20%;
    animation-delay: -7s;
}

.floating-shape-6 {
    width: 120px;
    height: 120px;
    top: 5%;
    right: 30%;
    animation-delay: -12s;
}

.floating-shape-7 {
    width: 100px;
    height: 100px;
    bottom: 40%;
    left: 5%;
    animation-delay: -2s;
}

.floating-shape-8 {
    width: 220px;
    height: 220px;
    top: 70%;
    left: 30%;
    animation-delay: -8s;
}

.floating-shape-9 {
    width: 90px;
    height: 90px;
    top: 15%;
    left: 40%;
    animation-delay: -4s;
}

.floating-shape-10 {
    width: 160px;
    height: 160px;
    bottom: 5%;
    left: 50%;
    animation-delay: -6s;
}

.floating-shape-11 {
    width: 130px;
    height: 130px;
    top: 45%;
    left: -30px;
    animation-delay: -9s;
}

.floating-shape-12 {
    width: 170px;
    height: 170px;
    bottom: 30%;
    right: 10%;
    animation-delay: -11s;
}

.floating-shape-13 {
    width: 140px;
    height: 140px;
    top: 25%;
    left: 15%;
    animation-delay: -13s;
}

.floating-shape-14 {
    width: 110px;
    height: 110px;
    bottom: 45%;
    right: 25%;
    animation-delay: -14s;
}

.floating-shape-15 {
    width: 130px;
    height: 130px;
    top: 55%;
    left: 60%;
    animation-delay: -15s;
}

.floating-shape-16 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    left: 25%;
    animation-delay: -16s;
}

.floating-shape-17 {
    width: 120px;
    height: 120px;
    top: 35%;
    right: 40%;
    animation-delay: -17s;
}

.floating-shape-18 {
    width: 160px;
    height: 160px;
    bottom: 50%;
    right: 5%;
    animation-delay: -18s;
}

.floating-shape-19 {
    width: 145px;
    height: 145px;
    top: 18%;
    left: 45%;
    animation-delay: -19s;
}

.floating-shape-20 {
    width: 125px;
    height: 125px;
    bottom: 35%;
    left: 8%;
    animation-delay: -20s;
}

.floating-shape-21 {
    width: 135px;
    height: 135px;
    top: 62%;
    right: 35%;
    animation-delay: -21s;
}

.floating-shape-22 {
    width: 115px;
    height: 115px;
    bottom: 25%;
    right: 48%;
    animation-delay: -22s;
}

.floating-shape-23 {
    width: 155px;
    height: 155px;
    top: 8%;
    left: 55%;
    animation-delay: -23s;
}

.floating-shape-24 {
    width: 125px;
    height: 125px;
    bottom: 12%;
    right: 15%;
    animation-delay: -24s;
}

.floating-shape-25 {
    width: 140px;
    height: 140px;
    top: 48%;
    left: 70%;
    animation-delay: -25s;
}

@keyframes float-shape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
        opacity: 0.8;
    }
}

/* Main Content Wrapper - Two halves */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100%;
}

/* Left Half - Form Container */
.left-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

/* Right Half - Calendar */
.right-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--bg-color);
    overflow: hidden;
}

/* Calendar Section - Right Side */
.calendar-section {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 244, 248, 0.9));
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(16, 42, 67, 0.15);
    z-index: 10;
}

/* Floating Grid Container */
.floating-grid-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem 3rem;
    background-color: var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(16, 42, 67, 0.1);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

.grid-month-header {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 0.8rem 0;
    background: linear-gradient(135deg, #102a43, #243b53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(50px, 1fr));
    grid-auto-rows: minmax(50px, auto);
    gap: 3px;
    position: relative;
    padding: 0.3rem;
    transform: translate(0, 0) !important;
    will-change: auto;
    border-radius: 10px;
    justify-content: center;
}

/* Floating Number Styles */
.floating-number {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 244, 248, 0.95));
    border: 1px solid rgba(16, 42, 67, 0.2);
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--text-color);
    cursor: pointer;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(16, 42, 67, 0.1);
    overflow: hidden;
    transform: translate(0, 0) !important;
    will-change: auto;
}

.floating-number:hover:not(.empty):not(.current-day) {
    box-shadow: 0 6px 16px rgba(16, 42, 67, 0.2);
    border-color: rgba(16, 42, 67, 0.5);
    transform: translate(0, 0) !important;
    animation: spin-360 0.6s linear 1;
}

.floating-number.empty {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: default;
    transform: translate(0, 0) !important;
}

.floating-number.current-day {
    background: linear-gradient(135deg, #102a43, #243b53);
    color: white;
    border-color: #102a43;
    box-shadow: 0 5px 20px rgba(16, 42, 67, 0.35);
    animation: pulse-heart 2s ease-in-out infinite;
    transform: translate(0, 0) !important;
}

.floating-number.current-day .day-number {
    font-size: 0.6rem;
    transform: translate(0, 0) !important;
}

.floating-number .heart {
    font-size: 0.35rem;
    margin-top: 2px;
    animation: heart-beat 1s ease-in-out infinite;
}

@keyframes pulse-heart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Responsive for two-column layout */
@media (max-width: 1200px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .left-half {
        flex: 1;
        min-height: 50vh;
    }
    
    .right-half {
        flex: 1;
        min-height: 50vh;
    }
}

/* Desktop footer - 3 sections */
@media (min-width: 769px) {
    .footer-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    .footer-section {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .footer-left {
        justify-content: flex-start !important;
    }
    
    .footer-center {
        flex: 1 !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .footer-right {
        justify-content: flex-end !important;
    }
}

@media (max-width: 768px) {
    .left-half,
    .right-half {
        padding: 1rem;
    }
    
    .container {
        padding: 1.5rem 1.5rem;
        max-width: 100%;
    }
    
    .floating-grid-container {
        padding: 1.5rem 1.5rem;
        max-width: 100%;
    }
    
    .floating-grid {
        grid-template-columns: repeat(7, minmax(40px, 1fr));
        grid-auto-rows: minmax(40px, auto);
        gap: 2px;
        padding: 0.2rem;
    }
    
    .floating-number {
        font-size: 0.65rem;
    }
    
    .grid-month-header {
        font-size: 1.2rem;
        margin: 0 0 0.6rem 0;
    }
    
    .calendar-section {
        width: calc(100% - 2rem);
        padding: 1rem;
    }
    
    .calendar-header h2 {
        font-size: 1.4rem;
    }
    
    .calendar-day {
        font-size: 0.85rem;
    }
    
    .calendar-weekdays span {
        font-size: 0.65rem;
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    * {
        box-sizing: border-box;
    }
    
    .main-wrapper {
        flex-direction: column;
        width: 100%;
    }
    
    .left-half,
    .right-half {
        padding: 0.5rem;
        overflow: auto;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .container {
        padding: 1rem 0.75rem;
        max-width: calc(100% - 1.5rem);
        width: 100%;
        margin: 0;
    }
    
    .floating-grid-container {
        padding: 1rem 0.75rem;
        max-width: calc(100% - 1.5rem);
        width: 100%;
        margin: 0;
    }
    
    .floating-grid {
        grid-template-columns: repeat(7, minmax(35px, 1fr));
        grid-auto-rows: minmax(35px, auto);
        gap: 1px;
        padding: 0.15rem;
        width: 100%;
    }
    
    .floating-number {
        font-size: 0.6rem;
        border-radius: 3px;
    }
    
    .floating-number.current-day .day-number {
        font-size: 0.55rem;
    }
    
    .floating-number .heart {
        font-size: 0.3rem;
    }
    
    .grid-month-header {
        font-size: 1rem;
        margin: 0 0 0.4rem 0;
    }
    
    header {
        margin-bottom: 1.5rem;
    }
    
    .app-logo {
        width: 100px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .btn-submit {
        padding: 10px;
        font-size: 14px;
    }
    
    .footer {
        width: 100%;
        padding: 1rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0;
        margin: 0;
        justify-content: center;
        align-items: center;
        max-width: 100%;
    }
    
    .footer-section {
        justify-content: center;
        width: 100%;
        flex: none;
    }
    
    .footer-left {
        justify-content: center;
    }
    
    .footer-right {
        justify-content: center;
    }
    
    .footer-center {
        flex: none;
    }
}

/* 360 degree spin animation */
@keyframes spin-360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.container {
    background-color: var(--primary-color);
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(16, 42, 67, 0.1);
    width: 100%;
    max-width: 720px;
    margin: 2rem auto;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Compact Header Layout */
.header-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.header-compact .app-logo {
    width: 60px;
    height: auto;
    flex-shrink: 0;
}

.header-compact .header-text {
    flex: 0 0 auto;
}

.header-compact h1 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

.header-compact p {
    font-size: 0.85rem;
    margin: 0.25rem 0 0 0;
    opacity: 0.8;
}

.app-logo {
    width: 150px;
    height: auto;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--secondary-color);
}

header p {
    font-size: 1rem;
    color: var(--accent-color);
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.required {
    color: #d32f2f;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--input-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="checkbox"] {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
    width: auto;
    padding: 0;
}

/* Smooth transitions for date/time picker on mobile */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(16, 42, 67, 0.1);
}

/* Smooth date/time picker transitions */
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="time"]:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Smooth transitions for all inputs including picker fields */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    transition: all 0.2s ease;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.specific-fields {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Page Styles */
.result-container {
    text-align: center;
}

.qr-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.qr-code {
    margin: 0 auto;
    border: 10px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: block;
}

.download-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.download-link:hover {
    border-bottom-color: var(--secondary-color);
}

/* Footer Styles */
.footer {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 2rem 1rem;
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    text-align: center;
}

.footer-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-left {
    justify-content: flex-start;
}

.footer-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-right {
    justify-content: flex-end;
}

.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-description {
    font-size: 0.85rem !important;
    opacity: 0.75 !important;
    margin: 0.25rem 0 !important;
}

.footer-tagline {
    font-size: 0.85rem !important;
    opacity: 0.7 !important;
    font-style: italic;
    margin: 0.25rem 0 !important;
}

.footer-links {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-hint {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.footer-hint:hover {
    opacity: 1;
}

/* Footer Hover Info Section */
.footer-info-section {
    max-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transition: max-height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
}

.footer-info-section.open {
    max-height: 500px;
    overflow: hidden;
    padding: 1rem 0;
}

.footer-hint {
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.footer-hint:hover {
    opacity: 1;
    transform: scale(1.05);
}

.footer-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: var(--primary-color);
}

.footer-info-column,
.footer-ethics-column,
.footer-blog-column {
    display: flex;
    flex-direction: column;
}

.footer-info-column h3,
.footer-ethics-column h3,
.footer-blog-column h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.footer-info-column ol {
    margin: 0;
    padding-left: 1.5rem;
    list-style: decimal;
}

.footer-info-column li {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-ethics-column p {
    margin: 0 0 0.8rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-ethics-column ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.footer-ethics-column li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-blog-column p {
    margin: 0 0 0.8rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-blog-column ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.footer-blog-column li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-blog-column a:hover {
    color: #9fb3ea !important;
    text-decoration: underline !important;
}

/* ===== RESPONSIVE STYLES FOR PHASE 1 COMPONENTS ===== */

/* Tablet (medium screens) */
@media (max-width: 1024px) {
    .footer-info-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-blog-column {
        grid-column: 1 / -1;
    }
}

/* Tablet and smaller */
@media (max-width: 768px) {
    .step-wizard {
        padding: 0 0.5rem;
    }
    
    .step-line {
        width: 40px;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .event-type-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .event-card {
        padding: 1rem 0.75rem;
    }
    
    .event-card-icon {
        width: 40px;
        height: 40px;
    }
    
    .event-card-title {
        font-size: 0.9rem;
    }
    
    .event-card-desc {
        font-size: 0.7rem;
    }
    
    .review-section {
        padding: 1rem;
    }
    
    .live-qr-preview {
        padding: 1rem;
    }
    
    .qr-preview-box {
        width: 250px;
        height: 280px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .step-progress {
        gap: 0;
    }
    
    .step-line {
        width: 30px;
        margin: 0 0.25rem;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .event-type-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .event-card {
        padding: 0.75rem 0.5rem;
        border-radius: 12px;
    }
    
    .event-card-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0.5rem;
    }
    
    .event-card-title {
        font-size: 0.85rem;
    }
    
    .event-card-desc {
        font-size: 0.65rem;
        display: none;
    }

    .demo-preview-bar {
        gap: 6px;
        padding: 8px 10px;
        margin-top: 10px;
    }

    .demo-preview-label {
        font-size: 0.7rem;
        width: 100%;
        justify-content: center;
        margin-bottom: 2px;
    }

    .demo-link {
        font-size: 0.68rem;
        padding: 3px 8px;
    }

    .event-card.selected::after {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
        top: 4px;
        right: 4px;
    }
    
    .selected-event-badge {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    #event-card-icon {
        font-size: 1.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        vertical-align: middle;
    }
    
    #selected-event-name {
        font-size: 0.9rem;
    }
    
    .btn-back {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .btn-next {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
    
    .review-section h3,
    .live-qr-preview h3 {
        font-size: 1rem;
    }
    
    .review-item {
        padding: 0.35rem 0;
    }
    
    .review-icon {
        font-size: 1rem;
    }
    
    .review-label {
        font-size: 0.7rem;
    }
    
    .review-value {
        font-size: 0.85rem;
    }
    
    .qr-preview-box {
        width: 250px;
        min-height: 280px;
    }
    
    .color-preset-mini {
        width: 24px;
        height: 24px;
    }
    
    .color-options input[type="color"] {
        width: 32px;
        height: 32px;
    }
    
    .toast-notification {
        bottom: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .toast-icon {
        font-size: 1rem;
    }
}

/* Responsive Design */

/* Modern iPhones (iPhone 12-15, XR, 11, etc.) - 375px to 430px */
@media (min-width: 375px) and (max-width: 430px) {
    body {
        padding: 0;
        background-color: var(--bg-color);
    }

    .main-wrapper {
        flex-direction: column;
    }
    
    .left-half,
    .right-half {
        padding: 0.5rem;
        width: 100%;
    }

    .container {
        padding: 1rem 0.75rem;
        margin: 0;
        width: calc(100% - 1.5rem);
        max-width: 100%;
        box-shadow: 0 8px 20px rgba(16, 42, 67, 0.12);
    }
    
    .floating-grid-container {
        padding: 1rem 0.75rem;
        max-width: 100%;
        width: calc(100% - 1.5rem);
    }
    
    .floating-grid {
        grid-template-columns: repeat(7, minmax(32px, 1fr));
        grid-auto-rows: minmax(32px, auto);
        gap: 1px;
        padding: 0.1rem;
    }
    
    .floating-number {
        font-size: 0.55rem;
        border-radius: 2px;
    }
    
    .floating-number.current-day .day-number {
        font-size: 0.5rem;
    }
    
    .floating-number .heart {
        font-size: 0.25rem;
        margin-top: 1px;
    }
    
    .grid-month-header {
        font-size: 0.9rem;
        margin: 0 0 0.3rem 0;
    }

    header {
        margin-bottom: 1.25rem;
    }

    header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    header p {
        font-size: 0.75rem;
        opacity: 0.85;
    }

    .app-logo {
        width: 50px;
        margin-bottom: 0.5rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    input,
    select,
    textarea {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .btn-submit {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 1rem 0.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        padding: 0;
        margin: 0;
        justify-content: center;
        align-items: center;
    }
    
    .footer-section {
        width: 100%;
        justify-content: center;
        flex: none;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        justify-content: center;
        width: 100%;
    }
    
    .social-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .footer-hint {
        font-size: 0.8rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 0.8rem 0.7rem;
        border-radius: 8px;
        border: 1.5px solid var(--border-color);
    }

    input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--secondary-color);
        box-shadow: 0 0 0 3px rgba(16, 42, 67, 0.08);
    }

    textarea {
        min-height: 90px;
    }

    .btn-submit {
        font-size: 1.05rem;
        padding: 0.95rem;
        margin-top: 0.75rem;
        border-radius: 8px;
    }

    .qr-wrapper {
        margin: 2rem 0;
    }

    .qr-code {
        width: 100%;
        max-width: 260px;
        height: auto;
        border-width: 8px;
    }

    .footer {
        padding: 1.75rem 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.35rem;
        text-align: center;
    }

    .footer-section {
        flex: 1 !important;
        width: 100%;
        justify-content: center !important;
    }

    .footer-left,
    .footer-right {
        justify-content: center !important;
    }

    .social-link {
        font-size: 0.9rem;
        padding: 0.75rem 1.3rem;
    }

    .footer-info p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .footer-tagline {
        font-size: 0.8rem !important;
    }

    .footer-links {
        font-size: 0.8rem;
    }

    /* Subtle floating shapes for iPhone */
    .floating-shape-1,
    .floating-shape-3 {
        opacity: 0.1;
        transform: scale(0.65);
    }

    .floating-shape-2,
    .floating-shape-5 {
        opacity: 0.08;
        transform: scale(0.75);
    }

    .floating-shape-4,
    .floating-shape-6 {
        opacity: 0.09;
        transform: scale(0.7);
    }
}

/* Tablets and larger phones */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        padding: 1.5rem 1.25rem;
        margin: 1rem 1rem;
        width: calc(100% - 2rem);
        max-width: 100%;
    }

    header {
        margin-bottom: 1.5rem;
    }

    header h1 {
        font-size: 1.85rem;
        margin-bottom: 0.5rem;
    }

    header p {
        font-size: 0.85rem;
    }

    .app-logo {
        width: 55px;
        margin-bottom: 0.75rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    label {
        font-size: 0.875rem;
        margin-bottom: 0.4rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 0.7rem 0.6rem;
    }

    textarea {
        min-height: 80px;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 0.9rem;
        margin-top: 0.5rem;
    }

    .qr-wrapper {
        margin: 1.5rem 0;
    }

    .qr-code {
        width: 100%;
        max-width: 240px;
        height: auto;
        border-width: 8px;
    }

    .footer {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }

    .footer-content {
        gap: 1.25rem;
    }

    .social-link {
        font-size: 0.875rem;
        padding: 0.7rem 1.2rem;
    }

    .footer-info p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .footer-tagline {
        font-size: 0.75rem !important;
    }

    .footer-links {
        font-size: 0.75rem;
    }

    /* Footer click-to-open info - responsive for mobile */
    .footer-info-section.open {
        max-height: 900px;
        overflow: hidden;
        padding: 1rem 0;
    }

    .footer-info-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0.75rem;
    }

    .footer-info-column h3,
    .footer-ethics-column h3,
    .footer-blog-column h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .footer-info-column li,
    .footer-ethics-column li,
    .footer-blog-column li {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .footer-ethics-column p,
    .footer-blog-column p {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    /* Adjust floating shapes for mobile */
    .floating-shape-1,
    .floating-shape-3 {
        opacity: 0.08;
        transform: scale(0.6);
    }

    .floating-shape-2,
    .floating-shape-5 {
        opacity: 0.06;
        transform: scale(0.7);
    }

    .floating-shape-4,
    .floating-shape-6 {
        opacity: 0.07;
        transform: scale(0.65);
    }
}

/* Small phones (smaller than iPhone SE) */
@media (max-width: 374px) {
    .container {
        padding: 1.25rem 1rem;
        margin: 0.75rem 0.75rem;
        width: calc(100% - 1.5rem);
    }

    header h1 {
        font-size: 1.65rem;
        line-height: 1.2;
    }

    header p {
        font-size: 0.8rem;
    }

    .app-logo {
        width: 48px;
        margin-bottom: 0.5rem;
    }

    .form-group {
        margin-bottom: 0.9rem;
    }

    label {
        font-size: 0.85rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 0.65rem 0.55rem;
    }

    .btn-submit {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .social-link {
        font-size: 0.8rem;
        padding: 0.65rem 1rem;
        gap: 0.4rem;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }

    .qr-code {
        max-width: 220px;
        border-width: 6px;
    }

    .footer {
        padding: 1.25rem 0.75rem;
    }

    .footer-content {
        gap: 1rem;
    }

    .footer-info p {
        font-size: 0.75rem;
    }

    .footer-tagline {
        font-size: 0.7rem !important;
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
        margin: 1rem auto;
    }

    .footer-links {
        font-size: 0.7rem;
    }
}

/* Tablet and larger screens */
@media (min-width: 769px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .footer-info {
        align-items: flex-start;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* CODE VALIDATION MODAL STYLES */
.modal {
    display: none;
    position: fixed !important;
    z-index: 9999 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal[style*="flex"] {
    display: flex !important;
}

.modal-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    position: relative;
    z-index: 10000;
    margin: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: #102a43;
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.modal-content p {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #102a43;
}

#codeInput {
    width: 100% !important;
    padding: 12px !important;
    margin: 15px 0 !important;
    border: 2px solid #d9e2ec !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    transition: all 0.3s;
    background-color: #ffffff !important;
    color: #102a43 !important;
}

#codeInput:focus {
    outline: none !important;
    border-color: #102a43 !important;
    box-shadow: 0 0 0 3px rgba(16, 42, 67, 0.1) !important;
}

#codeInput::placeholder {
    color: #999;
}

.modal-content button {
    width: 100% !important;
    padding: 12px !important;
    background: linear-gradient(135deg, #102a43, #243b53) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.2) !important;
}

/* Exclude calendar icon buttons from modal button styles */
.calendar-icon-btn-small {
    width: auto !important;
    padding: 0.75rem !important;
    background: transparent !important;
    color: var(--secondary-color) !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-weight: normal !important;
}

.calendar-icon-btn-small svg {
    color: white !important;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 42, 67, 0.4) !important;
}

.modal-content button:active {
    transform: translateY(0);
}

#codeError {
    color: #e74c3c !important;
    margin-top: 10px !important;
    text-align: center !important;
    display: none !important;
    font-size: 14px !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== RESPONSIVE DOWNLOAD MODAL STYLES ===== */
#downloadItems {
    margin: 20px 0 !important;
    text-align: left !important;
    display: block !important;
}

#downloadItems > div {
    display: flex !important;
    align-items: center !important;
    margin: 10px 0 !important;
    padding: 10px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

#downloadItems > div > span {
    font-size: 24px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

#downloadItems > div > div {
    flex: 1 !important;
    min-width: 0 !important;
}

#downloadItems .title {
    font-weight: 600 !important;
    color: #102a43 !important;
    margin: 0 !important;
    word-break: break-word !important;
}

#downloadItems .description {
    font-size: 12px !important;
    color: #666 !important;
    margin: 4px 0 0 0 !important;
    word-break: break-word !important;
}

#downloadProgress {
    display: none;
    margin: 15px 0 !important;
}

#downloadProgress.show {
    display: block !important;
}

#downloadProgress .progress-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #102a43 !important;
    margin-bottom: 8px !important;
}

#downloadProgress .progress-bar-container {
    width: 100% !important;
    height: 6px !important;
    background: #e0e0e0 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}

#progressBar {
    width: 0% !important;
    height: 100% !important;
    background: linear-gradient(90deg, #102a43, #243b53) !important;
    transition: width 0.3s ease !important;
    border-radius: 3px !important;
}

#downloadProgress .progress-percent {
    font-size: 12px !important;
    color: #666 !important;
    margin-top: 8px !important;
    text-align: center !important;
    display: block !important;
}

#downloadSuccess {
    display: none;
    margin: 15px 0 !important;
    padding: 15px !important;
    background: #e8f5e9 !important;
    border-radius: 8px !important;
    border-left: 4px solid #4caf50 !important;
}

#downloadSuccess.show {
    display: block !important;
}

#downloadSuccess .success-title {
    color: #2e7d32 !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

#downloadSuccess .success-message {
    color: #558b2f !important;
    font-size: 13px !important;
    margin: 5px 0 0 0 !important;
}

#downloadButtons {
    display: flex !important;
    gap: 10px !important;
    margin-top: 20px !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

#downloadButtons button {
    flex: 1 !important;
    padding: 12px !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    min-height: 48px !important;
    word-break: break-word !important;
}

#downloadButtons button:first-child {
    background: #f0f0f0 !important;
    color: #102a43 !important;
}

#downloadButtons button:first-child:active {
    transform: scale(0.98) !important;
}

#downloadButtons button:last-child {
    background: linear-gradient(135deg, #102a43, #243b53) !important;
    color: white !important;
}

#downloadButtons button:last-child:active {
    transform: scale(0.98) !important;
}

#downloadButtons button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 480px) {
    .modal-content {
        padding: 25px !important;
        width: 92% !important;
        max-width: 95% !important;
        margin: 10px !important;
        border-radius: 16px !important;
    }

    .modal-content h2 {
        font-size: 20px !important;
        margin: 0 0 10px 0 !important;
    }

    .modal-content > p {
        font-size: 13px !important;
        margin: 0 0 15px 0 !important;
    }

    #downloadItems > div {
        margin: 8px 0 !important;
        padding: 8px !important;
    }

    #downloadItems > div > span {
        font-size: 20px !important;
    }

    #downloadItems .title {
        font-size: 13px !important;
    }

    #downloadItems .description {
        font-size: 11px !important;
    }

    #downloadProgress .progress-label {
        font-size: 12px !important;
    }

    #downloadProgress .progress-percent {
        font-size: 11px !important;
    }

    #downloadSuccess .success-title {
        font-size: 14px !important;
    }

    #downloadSuccess .success-message {
        font-size: 12px !important;
    }

    #downloadButtons {
        gap: 8px !important;
    }

    #downloadButtons button {
        padding: 10px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }

    .modal-close {
        font-size: 24px !important;
        right: 15px !important;
        top: 15px !important;
    }
}

@media (max-width: 375px) {
    .modal-content {
        padding: 20px !important;
        width: 90% !important;
        max-width: 100% !important;
    }

    .modal-content h2 {
        font-size: 18px !important;
    }

    .modal-content > p {
        font-size: 12px !important;
    }

    #downloadItems > div {
        padding: 6px !important;
        margin: 6px 0 !important;
    }

    #downloadItems > div > span {
        font-size: 18px !important;
        margin-right: 8px !important;
    }

    #downloadItems .title {
        font-size: 12px !important;
    }

    #downloadItems .description {
        font-size: 10px !important;
    }

    #downloadButtons button {
        padding: 8px !important;
        font-size: 13px !important;
        min-height: 40px !important;
    }

    #downloadSuccess {
        padding: 12px !important;
    }
}

/* Tablet responsiveness */
@media (min-width: 768px) and (max-width: 1024px) {
    .modal-content {
        padding: 35px !important;
        max-width: 500px !important;
    }
}

/* Large screens */
@media (min-width: 1025px) {
    .modal-content {
        padding: 40px !important;
        max-width: 550px !important;
    }
}

/* DOWNLOAD BUTTONS STYLING */
.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.download-link {
    display: inline-block;
    background: linear-gradient(135deg, #102a43, #243b53);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.3);
}

.download-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 42, 67, 0.4);
}

.download-link:active {
    transform: translateY(-1px);
}

/* RESPONSIVE DOWNLOAD BUTTONS */
@media (max-width: 600px) {
    .download-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .download-link {
        width: 100%;
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        box-sizing: border-box;
    }

    .mobile-scan-hint {
        padding: 12px 15px;
        margin: 15px 0;
    }

    .mobile-scan-hint p {
        font-size: 13px;
    }
}

/* iPhone SE and small devices (375px) */
@media (max-width: 425px) {
    .download-buttons {
        gap: 8px;
        margin: 15px auto;
    }

    .download-link {
        padding: 11px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
}

/* iPhone XR and larger phones (414px) */
@media (min-width: 414px) and (max-width: 500px) {
    * {
        box-sizing: border-box;
    }
    
    .main-wrapper {
        flex-direction: column;
        width: 100%;
    }
    
    .left-half,
    .right-half {
        padding: 0.6rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .container {
        padding: 1.2rem 1rem;
        max-width: calc(100% - 2rem);
        width: 100%;
        margin: 0;
    }
    
    .floating-grid-container {
        padding: 1.2rem 1rem;
        max-width: calc(100% - 2rem);
        width: 100%;
        margin: 0;
    }
    
    .floating-grid {
        grid-template-columns: repeat(7, minmax(38px, 1fr));
        grid-auto-rows: minmax(38px, auto);
        gap: 1px;
        padding: 0.12rem;
        width: 100%;
    }
    
    .floating-number {
        font-size: 0.58rem;
        border-radius: 3px;
    }
    
    .floating-number.current-day .day-number {
        font-size: 0.52rem;
    }
    
    .floating-number .heart {
        font-size: 0.28rem;
    }
    
    .grid-month-header {
        font-size: 1rem;
        margin: 0 0 0.5rem 0;
    }
    
    header {
        margin-bottom: 1.5rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .app-logo {
        width: 80px;
    }
    
    .form-group {
        margin-bottom: 0.9rem;
    }
    
    .btn-submit {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    .footer {
        width: 100%;
        padding: 0.8rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.4rem;
        width: 100%;
        padding: 0;
        margin: 0;
        justify-content: center;
        align-items: center;
    }
    
    .footer-section {
        width: 100%;
        justify-content: center;
        flex: none;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        justify-content: center;
        width: 100%;
    }
}

/* QR Color Customization on Result Page */
.qr-color-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(16, 42, 67, 0.12);
    display: block !important;
    visibility: visible !important;
}

.color-selector {
    text-align: center;
    display: block !important;
}

.color-selector label {
    display: block !important;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-size: 1.1rem;
    visibility: visible !important;
}

.color-picker-inline {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    visibility: visible !important;
}

#result-qr-color {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#result-qr-color::-webkit-color-swatch-wrapper {
    padding: 4px;
    border: none;
    border-radius: 8px;
}

#result-qr-color::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#result-qr-color::-moz-color-swatch {
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#result-qr-color:hover {
    border-color: var(--secondary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 42, 67, 0.15);
}

.color-name {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 80px;
    font-size: 0.95rem;
}

.color-preset {
    width: 35px;
    height: 35px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    background: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: inline-block !important;
    visibility: visible !important;
}

.color-preset[data-color="#000000"] { background-color: #000000 !important; }
.color-preset[data-color="#102a43"] { background-color: #102a43 !important; }
.color-preset[data-color="#d32f2f"] { background-color: #d32f2f !important; }
.color-preset[data-color="#388e3c"] { background-color: #388e3c !important; }
.color-preset[data-color="#7b1fa2"] { background-color: #7b1fa2 !important; }

.color-preset:hover {
    transform: scale(1.2);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.2);
}

.color-preset:active {
    transform: scale(1.1);
}

/* QR Wrapper enhanced styling */
.qr-wrapper {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.08);
    text-align: center;
}

.qr-wrapper img,
.qr-wrapper canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}


/* Responsive design for color picker */
@media (max-width: 768px) {
    .color-picker-inline {
        gap: 0.75rem;
    }
    
    #result-qr-color {
        width: 45px;
        height: 45px;
    }
    
    .color-preset {
        width: 30px;
        height: 30px;
    }
    
    .qr-color-section {
        padding: 1rem;
        margin: 1.5rem 0;
    }
}

/* ===== OCR LOADER STYLES ===== */
.ocr-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ANALYZED EVENT DETAILS ===== */
.analyzed-details {
    background: linear-gradient(135deg, rgba(16, 42, 67, 0.05), rgba(36, 59, 83, 0.08));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.analyzed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.analyzed-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.analyzed-item label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.analyzed-item span {
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.analysis-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-secondary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.2);
}

/* Mobile responsive for analyzed details */
@media (max-width: 768px) {
    .analyzed-details {
        padding: 1rem;
    }
    
    .analyzed-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .analysis-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .analysis-actions small {
        text-align: center;
        margin-left: 0 !important;
    }
}

.ocr-loader span {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== CALENDAR APPS SECTION STYLES (Compact - Below Footer) ===== */
.calendar-apps-section {
    background: var(--bg-color);
    padding: 0.5rem 0.5rem;
    opacity: 0.6;
}

.calendar-apps-container {
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
}

.calendar-apps-title {
    color: var(--secondary-color);
    font-size: 0.65rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    text-align: center;
    display: block;
}

.calendar-apps-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.calendar-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    background: var(--primary-color);
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.calendar-app-item:hover {
    border-color: var(--secondary-color);
}

.calendar-app-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.calendar-app-icon.google-calendar {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.calendar-app-icon.apple-calendar {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.calendar-app-icon.outlook-calendar {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.calendar-app-icon.universal-calendar {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.calendar-app-icon svg {
    width: 12px;
    height: 12px;
}

.calendar-app-text {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--secondary-color);
    text-align: center;
    line-height: 1.1;
}

.calendar-app-text small {
    font-size: 0.5rem;
    font-weight: 400;
    color: var(--accent-color);
    opacity: 0.7;
}

/* Responsive Design for Calendar Apps */
@media (max-width: 768px) {
    .calendar-apps-section {
        padding: 0.4rem 0.4rem;
    }

    .calendar-apps-title {
        font-size: 0.6rem;
    }

    .calendar-apps-grid {
        gap: 0.3rem;
    }

    .calendar-app-item {
        padding: 0.25rem 0.3rem;
    }

    .calendar-app-icon {
        width: 18px;
        height: 18px;
    }

    .calendar-app-icon svg {
        width: 10px;
        height: 10px;
    }

    .calendar-app-text {
        font-size: 0.5rem;
    }

    .calendar-app-text small {
        font-size: 0.45rem;
    }
}

@media (max-width: 480px) {
    .calendar-apps-grid {
        gap: 0.25rem;
    }

    .calendar-app-item {
        padding: 0.2rem 0.25rem;
    }
    
    .calendar-app-icon {
        width: 16px;
        height: 16px;
    }

    .calendar-app-icon svg {
        width: 9px;
        height: 9px;
    }

    .calendar-app-text {
        font-size: 0.45rem;
    }

    .calendar-app-text small {
        font-size: 0.4rem;
    }
}

/* ===== SMOOTH DATE/TIME PICKER ON MOBILE ===== */
@media (max-width: 768px) {
    /* Enhance touch targets for date/time picker */
    input[type="datetime-local"],
    input[type="date"],
    input[type="time"] {
        padding: 1rem 0.75rem;
        min-height: 48px;
        font-size: 16px;
        /* Prevent iOS zoom on input focus */
        -webkit-text-size-adjust: 100%;
    }

    /* Smooth opening animation for picker */
    input[type="datetime-local"]:focus,
    input[type="date"]:focus,
    input[type="time"]:focus {
        background-color: #f8f9fa;
        transition: all 0.25s ease;
    }

    /* Smooth closing transition */
    input[type="datetime-local"],
    input[type="date"],
    input[type="time"] {
        transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }
}

/* Calendar Modal Styles */
.calendar-modal-new {
    max-width: 320px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.calendar-modal-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
}

.calendar-icons-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.calendar-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.calendar-icon-btn-small {
    position: relative;
    background: transparent;
    border: 2px solid var(--border-color);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.calendar-icon-btn-small:hover {
    border-color: var(--secondary-color);
    background: rgba(16, 42, 67, 0.05);
    transform: translateY(-2px);
}

.calendar-icon-btn-small svg {
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.calendar-icon-btn-small:hover svg {
    stroke: var(--secondary-color);
    opacity: 0.8;
}

.calendar-btn-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
}

/* Tooltip on hover */
.calendar-icon-btn-small::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -2.2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 42, 67, 0.95);
    color: white;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.calendar-icon-btn-small:hover::after {
    opacity: 1;
}

/* Info Tooltip for Event Types */
.info-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    cursor: help;
}

.info-icon {
    vertical-align: middle;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.info-tooltip-wrapper:hover .info-icon {
    opacity: 1;
    transform: scale(1.1);
}

.info-tooltip-content {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    background: rgba(16, 42, 67, 0.97);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.6;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.info-tooltip-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(16, 42, 67, 0.97);
}

.info-tooltip-content strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #ffd700;
}

.info-tooltip-content b {
    color: #a5d6ff;
    font-weight: 600;
}

.info-tooltip-wrapper:hover .info-tooltip-content {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 600px) {
    .info-tooltip-content {
        left: auto;
        right: -10px;
        transform: none;
        font-size: 0.75rem;
        max-width: 260px;
        white-space: normal;
    }
    .info-tooltip-content::before {
        left: auto;
        right: 20px;
        transform: none;
    }
}

.calendar-modal-cancel {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-modal-cancel:hover {
    background: #e0e0e0;
}
}

/* ===== Rating Badge (Footer Center) ===== */
.rating-badge-wrapper {
    display: none;
    justify-content: center;
    margin-bottom: 0.6rem;
}

.rating-badge-wrapper.visible {
    display: flex;
    align-items: center;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 20px;
    animation: ratingFadeIn 0.5s ease-out;
    box-shadow: 0 2px 10px rgba(245, 166, 35, 0.2);
}

.rating-badge-stars {
    display: flex;
    gap: 2px;
    font-size: 14px;
    line-height: 1;
}

.rating-badge-stars span {
    filter: drop-shadow(0 1px 2px rgba(245, 166, 35, 0.5));
}

/* Responsive rating badge */
@media (max-width: 768px) {
    .rating-badge-wrapper {
        margin-bottom: 0.5rem;
    }

    .rating-badge {
        padding: 5px 12px;
        gap: 4px;
    }

    .rating-badge-stars {
        font-size: 12px;
        gap: 1px;
    }
}

@media (max-width: 480px) {
    .rating-badge-wrapper {
        margin-bottom: 0.4rem;
    }

    .rating-badge {
        padding: 4px 10px;
        border-radius: 16px;
    }

    .rating-badge-stars {
        font-size: 11px;
    }
}

@keyframes ratingFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== Rating Modal ===== */
.rating-modal-content {
    max-width: 380px;
}

.rating-modal-title {
    color: #102a43;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.rating-modal-subtitle {
    color: #627d98;
    font-size: 13px;
    margin: 0 0 20px 0;
}

.rating-stars-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rating-star {
    font-size: 36px;
    color: #d9e2ec;
    cursor: pointer;
    transition: color 0.2s, transform 0.15s;
    user-select: none;
}

.rating-star:hover,
.rating-star.hovered {
    color: #f5a623;
    transform: scale(1.15);
}

.rating-star.selected {
    color: #f5a623;
}

.rating-label {
    color: #627d98;
    font-size: 13px;
    margin: 4px 0 20px 0;
    min-height: 18px;
}

.rating-actions {
    display: flex;
    gap: 10px;
}

.rating-btn-skip {
    flex: 1;
    padding: 10px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.rating-btn-skip:hover {
    background: #e0e0e0;
}

.rating-btn-submit {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #102a43, #243b53);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.rating-btn-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rating-btn-submit:not(:disabled):hover {
    opacity: 0.9;
}

.rating-thank-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #102a43, #243b53);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
