:root {
    /* --- Theme Customization --- */
    /* Easily change the look and feel of the invitation by modifying these CSS variables. */
    /* For example, to create a "Space Explorer" theme:
        --primary-color: #00a8ff; // A bright blue
        --secondary-color: #0a0f1f; // Dark space blue
        --tertiary-color: #ffffff; // White for text
        --background-color: #151b30; // Slightly lighter dark blue for containers
        // You might also want to change the font or add a background image to the body.
    */
    /* Default Theme (Retro Game) */
    --primary-color: #FF0000;
    --secondary-color: #000000;
    --tertiary-color: #FFFFFF;
    --background-color: #333333;
    --pixel-border: 4px solid var(--secondary-color);
    --base-font-size: 16px;
    --button-size: 44px;
    --spacing-unit: 1rem;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', cursive;
}

body {
    background-color: var(--secondary-color);
    color: var(--tertiary-color);
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(255, 0, 0, 0.3); /* Custom tap highlight color */
    touch-action: manipulation; /* Disable double-tap to zoom */
    position: relative;
}

/* Floating background particles */
.bg-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3); /* Increased opacity */
    border-radius: 50%;
    pointer-events: none;
    z-index: 1; /* Increased z-index to be above background but below content */
    animation: float-up 15s linear infinite;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); /* Added glow effect */
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 0.8;
        transform: translateY(10vh) scale(1);
    }
    100% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center; /* Changed back to center for better alignment */
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    /* Ensure content is visible on mobile browsers */
    padding-top: env(safe-area-inset-top, 20px);
}

/* Specific adjustments for invitation screen */
#invitation-screen {
    align-items: flex-start;
    padding-top: 60px; /* Add more space at the top */
}

/* Portrait mode warning for mobile */
#portrait-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: var(--tertiary-color);
    text-align: center;
    padding: 20px;
}

#portrait-warning .icon {
    font-size: 50px;
    margin-bottom: 20px;
    animation: rotate-device 2s infinite;
}

#portrait-warning p {
    font-size: 16px;
    max-width: 300px;
    margin-bottom: 15px;
}

@keyframes rotate-device {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

.screen.active {
    display: flex;
}

/* Loading Screen */
.loading-content {
    text-align: center;
    width: 80%;
    max-width: 600px;
}

.loading-content h1 {
    margin-bottom: 40px;
    font-size: 28px;
    color: var(--primary-color);
    text-shadow: 3px 3px 0 var(--secondary-color);
}

.progress-container {
    height: 30px;
    background-color: var(--background-color);
    border: var(--pixel-border);
    margin-bottom: 15px;
    position: relative;
}

#progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.2s;
    position: relative;
    overflow: hidden;
}

#progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: progress-shine 1.5s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#loading-text {
    font-size: 16px;
    margin-top: 10px;
}

/* Main Invitation Screen */
.invitation-container {
    width: 100%;
    max-width: 800px;
    background-color: var(--background-color);
    border: var(--pixel-border);
    padding: 30px;
    text-align: center;
    margin: 60px auto 20px; /* Increased top margin for better desktop view */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Desktop specific adjustments */
@media (min-height: 800px) {
    .screen {
        padding-top: 40px;
        align-items: center; /* Center vertically on taller screens */
    }
    
    .invitation-container {
        margin-top: 20px; /* Reset margin on taller screens */
    }
}

/* Subtle sparkle effect for invitation container */
.invitation-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px); /* Much more subtle dots */
    background-size: 30px 30px; /* Larger spacing between dots */
    pointer-events: none;
    animation: sparkle 30s linear infinite; /* Slower animation */
    z-index: 1;
    opacity: 0.5; /* Lower overall opacity */
}

/* Remove the second sparkle layer to reduce visual noise */

@keyframes sparkle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header {
    margin-bottom: 30px;
}

.header h1 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 var(--secondary-color);
    animation: text-pulse 2s infinite alternate;
}

.header h2 {
    font-size: 24px;
    color: var(--tertiary-color);
    text-shadow: 2px 2px 0 var(--secondary-color);
}

@keyframes text-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.profile-section {
    margin-bottom: 30px;
}

.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: var(--pixel-border);
    object-fit: cover;
    background-color: var(--tertiary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-speed);
}

.profile-pic:hover, 
.profile-pic:active {
    transform: scale(1.05);
}

.party-details {
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.icon {
    font-size: 24px;
    margin-right: 15px;
    color: var(--primary-color);
}

.icon i {
    animation: icon-bounce 2s infinite alternate;
}

@keyframes icon-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* Location and Calendar link styles */
.location-link, .calendar-link {
    color: var(--tertiary-color);
    text-decoration: none;
    position: relative;
    transition: color var(--transition-speed);
    cursor: pointer;
}

.location-link:hover,
.location-link:active,
.calendar-link:hover,
.calendar-link:active {
    color: var(--primary-color);
}

.location-link::after,
.calendar-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed);
}

.location-link:hover::after,
.location-link:active::after,
.calendar-link:hover::after,
.calendar-link:active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Add to calendar icon */
.add-calendar-icon {
    font-size: 14px;
    margin-left: 8px;
    color: var(--primary-color);
    opacity: 0.8;
    transition: opacity var(--transition-speed), transform var(--transition-speed);
}

.calendar-link:hover .add-calendar-icon,
.calendar-link:active .add-calendar-icon {
    opacity: 1;
    transform: scale(1.2);
}

/* Calendar modal styles */
.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.calendar-modal.active {
    opacity: 1;
    visibility: visible;
}

.calendar-modal-content {
    background-color: var(--background-color);
    border: var(--pixel-border);
    padding: 20px;
    max-width: 90%;
    width: 350px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.calendar-modal-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.calendar-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.calendar-option {
    background-color: var(--primary-color);
    color: var(--tertiary-color);
    border: none;
    padding: 12px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    border: 2px solid var(--secondary-color);
}

.calendar-option:hover,
.calendar-option:active {
    background-color: #cc0000;
    transform: translateY(-2px);
}

.calendar-option i {
    margin-right: 8px;
    font-size: 16px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--tertiary-color);
    font-size: 20px;
    cursor: pointer;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.close-modal:hover,
.close-modal:active {
    color: var(--primary-color);
    transform: scale(1.1);
}

.countdown-section {
    margin-bottom: 30px;
}

.countdown-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 18px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-color);
    border: var(--pixel-border);
    padding: 10px;
    width: 80px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-speed);
}

.countdown-item:hover,
.countdown-item:active {
    transform: translateY(-5px);
}

.countdown-item span {
    font-size: 20px;
}

.countdown-item .label {
    font-size: 10px;
    margin-top: 5px;
}

.info-section {
    margin-bottom: 30px;
}

.info-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 18px;
}

.info-section ul {
    list-style-type: none;
    text-align: center;
}

.info-section li {
    margin-bottom: 10px;
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.info-section li:before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.rsvp-section {
    margin-bottom: 30px;
}

.rsvp-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.rsvp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--tertiary-color);
    text-decoration: none;
    padding: 15px 25px;
    font-size: 16px;
    border: var(--pixel-border);
    cursor: pointer;
    transition: transform var(--transition-speed), background-color var(--transition-speed), box-shadow var(--transition-speed);
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.rsvp-button i {
    margin-right: 10px;
    font-size: 20px;
}

.rsvp-button:hover,
.rsvp-button:active {
    transform: scale(1.05) translateY(-5px);
    background-color: #cc0000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.rsvp-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.rsvp-button:hover::after,
.rsvp-button:active::after {
    transform: translateX(100%);
}

.games-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 18px;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-button {
    background-color: var(--primary-color);
    color: var(--tertiary-color);
    border: var(--pixel-border);
    padding: 15px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: transform var(--transition-speed), background-color var(--transition-speed), box-shadow var(--transition-speed);
    min-width: var(--button-size);
    min-height: var(--button-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.game-button i {
    margin-right: 8px;
}

.game-button:hover,
.game-button:active {
    transform: scale(1.05) translateY(-5px);
    background-color: #cc0000;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.game-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.game-button:hover::after,
.game-button:active::after {
    transform: translateX(100%);
}

/* Game Screens */
.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 var(--secondary-color);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 16px;
}

#robux-game-container,
#memory-game-container {
    width: 100%;
    max-width: 600px;
    height: 400px;
    background-color: var(--background-color);
    border: var(--pixel-border);
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

#memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    padding: 20px;
    height: 100%;
}

.memory-card {
    background-color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
    transform-style: preserve-3d;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

/* Enhanced matched card styling */
.memory-card.matched {
    transform: rotateY(180deg);
    animation: match-success 0.5s ease-in-out;
    border: 2px solid gold;
    box-shadow: 0 0 10px gold;
}

.memory-card.matched .front {
    background-color: #00cc00; /* Green background for matched cards */
    color: var(--tertiary-color); /* White text */
}

@keyframes match-success {
    0% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.2); }
    100% { transform: rotateY(180deg) scale(1); }
}

.memory-card .front,
.memory-card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.memory-card .front {
    background-color: var(--tertiary-color);
    transform: rotateY(180deg);
    font-size: 30px;
    color: var(--primary-color);
}

.memory-card .front i {
    font-size: 30px;
}

.memory-card .back {
    background-color: var(--primary-color);
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    background-color: var(--background-color);
    color: var(--tertiary-color);
    border: var(--pixel-border);
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    min-width: var(--button-size);
    min-height: var(--button-size);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.back-button i {
    margin-right: 8px;
}

.back-button:hover,
.back-button:active {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.robux {
    position: absolute;
    width: 60px; /* Increased size for better touch targets */
    height: 60px;
    cursor: pointer;
    z-index: 5;
    transform-origin: center;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: balloon-float 3s infinite alternate;
}

.robux i {
    font-size: 45px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

@keyframes balloon-float {
    0% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
    100% { transform: translateY(-5px) rotate(3deg); }
}

/* Responsive Design with Multiple Breakpoints */
@media (max-width: 1024px) {
    :root {
        --base-font-size: 15px;
    }
    
    .invitation-container {
        max-width: 700px;
        padding: 25px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .header h2 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    :root {
        --base-font-size: 14px;
        --pixel-border: 3px solid var(--secondary-color);
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .header h2 {
        font-size: 18px;
    }
    
    .countdown-item {
        width: 60px;
        padding: 8px;
    }
    
    .countdown-item span {
        font-size: 16px;
    }
    
    .rsvp-button {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 160px;
    }
    
    .game-buttons {
        gap: 10px;
    }
    
    .game-button {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    #robux-game-container,
    #memory-game-container {
        height: 350px;
    }
    
    #memory-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 8px;
    }
    
    .profile-pic {
        width: 140px;
        height: 140px;
    }
    
    .invitation-container {
        padding: 20px;
    }
    
    .game-stats {
        gap: 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    :root {
        --base-font-size: 12px;
        --pixel-border: 2px solid var(--secondary-color);
    }
    
    .screen {
        padding-top: 50px; /* Additional padding for mobile browsers */
        align-items: flex-start; /* Align content to the top */
    }
    
    .loading-content h1 {
        font-size: 20px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header h2 {
        font-size: 16px;
    }
    
    .profile-pic {
        width: 120px;
        height: 120px;
    }
    
    .countdown {
        gap: 8px;
    }
    
    .countdown-item {
        width: 50px;
        padding: 6px;
    }
    
    .countdown-item span {
        font-size: 14px;
    }
    
    .countdown-item .label {
        font-size: 8px;
    }
    
    .rsvp-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .rsvp-button {
        width: 100%;
    }
    
    .game-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-button {
        width: 100%;
    }
    
    #robux-game-container,
    #memory-game-container {
        height: 300px;
    }
    
    #memory-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 6px;
        padding: 10px;
    }
    
    .invitation-container {
        padding: 15px;
        margin: 10px auto;
    }
    
    .detail-item {
        font-size: 14px;
    }
    
    .icon {
        font-size: 20px;
        margin-right: 10px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }
    
    .game-header h2 {
        font-size: 18px;
    }
    
    #location-scratch-card {
        height: 120px;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .screen {
        align-items: flex-start;
        padding-top: 30px; /* Increased padding for better visibility */
    }
    
    .invitation-container {
        margin: 10px auto;
        padding: 15px;
    }
    
    .profile-section {
        margin-bottom: 15px;
    }
    
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    
    .countdown-section, 
    .info-section, 
    .rsvp-section {
        margin-bottom: 15px;
    }
    
    #robux-game-container,
    #memory-game-container {
        height: 250px;
    }
}

/* Enhanced Animations */
@keyframes pixel-fade {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.pixel-animation {
    animation: pixel-fade 1s infinite;
}

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

.fa-bounce {
    display: inline-block;
    animation: fa-bounce 1s infinite;
}

/* Touch-specific styles */
@media (hover: none) {
    /* Styles for touch devices */
    .rsvp-button:active,
    .game-button:active,
    .back-button:active,
    .location-option:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    /* Add active state visual feedback */
    .active-touch {
        background-color: #cc0000 !important;
        transform: scale(0.95) !important;
    }
}

/* Social Share Buttons */
.social-button {
    color: var(--tertiary-color);
    border: var(--pixel-border);
    padding: 10px 15px;
    font-size: 12px; /* Adjusted for smaller buttons */
    cursor: pointer;
    transition: transform var(--transition-speed), opacity var(--transition-speed);
    min-width: var(--button-size);
    min-height: var(--button-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none; /* For anchor tags styled as buttons */
    font-family: 'Press Start 2P', cursive; /* Ensure font consistency */
}

.social-button i {
    margin-right: 8px;
    font-size: 16px;
}

.social-button:hover,
.social-button:active {
    transform: scale(1.05) translateY(-3px);
    opacity: 0.9;
}


/* Print-Specific Styles */
@media print {
    body {
        background-color: #FFFFFF !important; /* White background for printing */
        color: #000000 !important; /* Black text for printing */
        font-family: Arial, sans-serif !important; /* Use a standard print font */
        margin: 20px !important;
        -webkit-print-color-adjust: exact !important; /* Ensure colors print in Chrome/Safari */
        print-color-adjust: exact !important; /* Standard */
    }

    /* Hide elements not needed for print */
    #loading-screen,
    #portrait-warning,
    .bg-particle,
    .countdown-section,
    .games-section,
    .rsvp-options .rsvp-button, /* Hide original RSVP buttons */
    #print-button, /* Hide the print button itself */
    .calendar-modal,
    .game-header,
    #robux-game-screen,
    #memory-game-screen,
    .back-button,
    .invitation-container::before, /* Hide sparkle effect */
    .invitation-container > div:first-child { /* Hide template preview banner */
        display: none !important;
    }

    .screen, #invitation-screen {
        position: static !important;
        display: block !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .invitation-container {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        padding: 20px !important;
        max-width: 100% !important; /* Allow it to take full printable width */
        margin: 0 auto !important;
    }

    .header h1, .header h2 {
        color: var(--primary-color) !important; /* Keep brand color for headers if desired, or change to black */
        text-shadow: none !important;
        font-size: 24pt !important; /* Adjust font size for print */
    }
    .header h2 {
        font-size: 18pt !important;
        color: #333 !important;
    }

    .profile-pic {
        max-width: 150px !important; /* Control image size for print */
        border: 2px solid #000 !important;
        margin-bottom: 15px !important;
    }

    .party-details .detail-item {
        justify-content: flex-start !important; /* Align details to the left */
        font-size: 12pt !important;
        margin-bottom: 10px !important;
    }
    .party-details .icon {
        font-size: 16pt !important;
        margin-right: 10px !important;
        color: var(--primary-color) !important; /* Keep icon color */
    }
    .party-details .text, .party-details .location-link {
        color: #000 !important;
        text-decoration: none !important;
    }
    .add-calendar-icon {
        display: none !important; /* Hide interactive calendar icons */
    }


    .info-section h3 {
        color: var(--primary-color) !important;
        font-size: 14pt !important;
        text-align: left !important;
    }
    .info-section ul {
        text-align: left !important;
        padding-left: 0 !important; /* Remove default list padding if not desired */
    }
    .info-section li {
        font-size: 12pt !important;
        margin-bottom: 8px !important;
        padding-left: 0 !important; /* Remove custom bullet padding */
    }
     .info-section li:before {
        display: none; /* Hide custom bullet, use default or none */
     }


    /* Ensure links are still somewhat identifiable if needed, or style them as plain text */
    a {
        color: #000 !important;
        text-decoration: none !important; /* Or underline if preferred for print */
    }
    /* Show hrefs for links in print - optional */
    /*
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555;
    }
    */

    /* Adjust Font Awesome icons if they don't print well, or hide them */
    .fas, .fab {
        /* font-family: 'Font Awesome 6 Free' !important; Ensure font is available or use alternatives */
    }
}

/* Particle effect for game success */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 1;
    z-index: 100;
}

/* Balloon pop particles - multiple colors */
.particle.red { background-color: #ff5555; }
.particle.blue { background-color: #5555ff; }
.particle.green { background-color: #55ff55; }
.particle.yellow { background-color: #ffff55; }
.particle.purple { background-color: #ff55ff; }

/* Confetti animation for matched cards */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 1;
    pointer-events: none;
    z-index: 100;
}

.confetti.square {
    width: 8px;
    height: 8px;
    background-color: gold;
    transform: rotate(45deg);
}

.confetti.rectangle {
    width: 12px;
    height: 6px;
    background-color: #ff5555;
}

.confetti.circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #5555ff;
}

.confetti.triangle {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid #55ff55;
}
