/* ========================================
   QR PAGE SPECIFIC STYLES
   ======================================== */

.qr-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* QR Header */
.qr-header {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.qr-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-primary);
    transform: translateX(-5px);
}

/* QR Main */
.qr-main {
    flex: 1;
    padding: var(--spacing-lg) 0;
}

/* QR Hero */
.qr-hero {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.qr-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--accent-primary);
    animation: fadeInUp 0.8s ease;
}

.qr-welcome {
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.qr-welcome p {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.qr-welcome p:last-child {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

/* Choice Blocks */
.choice-blocks {
    display: grid;
    gap: var(--spacing-xl);
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.choice-block {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: 24px;
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.choice-block:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 24px 48px rgba(221, 32, 118, 0.2);
    border-color: var(--accent-primary);
}

.choice-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 8px 16px rgba(221, 32, 118, 0.3);
    transition: all var(--transition-fast);
}

.choice-block:hover .choice-icon {
    transform: rotate(360deg) scale(1.1);
}

.choice-icon i {
    font-size: 2.75rem;
    color: white;
}

.choice-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.choice-subtitle {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.choice-description {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* QR Form */
.qr-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto;
}

.qr-input {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
}

.qr-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* QR Footer */
.qr-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.qr-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.qr-social a {
    width: 60px;
    height: 60px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.75rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.qr-social a:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-5px) scale(1.1);
}

.qr-link {
    font-size: var(--font-size-md);
}

.qr-link a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.qr-link a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.qr-footer .footer-credit {
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.qr-footer .footer-credit a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.qr-footer .footer-credit a:hover {
    color: var(--accent-primary);
}

/* Magic Trigger Button */
.magic-trigger {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(221, 32, 118, 0.4);
}

.magic-trigger::before {
    content: '✨';
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: sparkleFloat 2s ease-in-out infinite;
}

@keyframes sparkleFloat {
    0%, 100% {
        transform: translateY(10px) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 1;
    }
}

.magic-trigger:hover {
    background: linear-gradient(135deg, #ff2d8f, var(--accent-primary));
    transform: translateY(-5px) scale(1.15) rotate(5deg);
    box-shadow: 0 12px 24px rgba(221, 32, 118, 0.6);
}

.magic-trigger:active {
    transform: translateY(-5px) scale(1.05);
}

.magic-trigger i {
    animation: hatWiggle 1s ease-in-out infinite;
}

@keyframes hatWiggle {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

/* ========================================
   RESPONSIVE DESIGN (Desktop)
   ======================================== */
@media (max-width: 767px) {
    .qr-page {
        font-size: 16px;
    }
    
    .qr-header {
        padding: var(--spacing-sm) 0;
    }
    
    .qr-header .container {
        padding: 0 var(--spacing-sm);
    }
    
    .qr-header .theme-toggle {
        width: 50px;
        height: 50px;
        border-radius: 50%;
    }
    
    .qr-title {
        font-size: var(--font-size-xl);
        padding: 0 var(--spacing-sm);
    }
    
    .qr-welcome {
        padding: 0 var(--spacing-sm);
    }
    
    .qr-welcome p {
        font-size: var(--font-size-sm);
    }
    
    .choice-blocks {
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }
    
    .choice-block {
        padding: var(--spacing-md);
    }
    
    .choice-icon {
        width: 70px;
        height: 70px;
    }
    
    .choice-icon i {
        font-size: 2rem;
    }
    
    .choice-title {
        font-size: var(--font-size-lg);
    }
    
    .choice-subtitle {
        font-size: var(--font-size-md);
    }
    
    .choice-description {
        font-size: var(--font-size-sm);
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: var(--font-size-sm);
    }
    
    .qr-social a,
    .magic-trigger {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .qr-title {
        font-size: var(--font-size-3xl);
    }
    
    .qr-welcome p {
        font-size: var(--font-size-lg);
    }
    
    .choice-blocks {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qr-form {
        flex-direction: row;
    }
    
    .qr-input {
        flex: 1;
    }
}

@media (min-width: 1024px) {
    .qr-title {
        font-size: 4rem;
    }
    
    .choice-block {
        padding: 2.5rem;
    }
    
    .choice-icon {
        width: 110px;
        height: 110px;
    }
    
    .choice-icon i {
        font-size: 3.5rem;
    }
    
    .choice-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   MAGIC CARD REVEAL
   ======================================== */
.magic-card-reveal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.magic-card-reveal.active {
    opacity: 1;
    visibility: visible;
}

.magic-card-container {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 3px solid var(--accent-primary);
    border-radius: 24px;
    padding: 3rem 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(221, 32, 118, 0.4),
                0 0 100px rgba(221, 32, 118, 0.2);
    animation: magicAppear 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes magicAppear {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.magic-sparkles {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
}

.magic-question {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(221, 32, 118, 0.5);
}

.magic-card-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
    animation: cardFlip 1s ease-in-out;
    border: 2px solid rgba(221, 32, 118, 0.3);
}

@keyframes cardFlip {
    0% {
        transform: rotateY(180deg) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: rotateY(90deg) scale(0.8);
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

.magic-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
    font-style: italic;
    animation: fadeInUp 1s ease 0.5s both;
}

.magic-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.magic-close:hover {
    background: var(--accent-primary);
    transform: rotate(90deg) scale(1.1);
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .magic-card-container {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    
    .magic-question {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .magic-card-image {
        max-width: 250px;
        margin-bottom: 1.5rem;
    }
    
    .magic-message {
        font-size: 1rem;
    }
    
    .magic-sparkles {
        font-size: 2.5rem;
    }
}
