/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8941e;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-light: #e8e8e8;
    --text-dim: #a0a0a0;
    --accent-blue: #4a9eff;
    --accent-purple: #9d4edd;
    --shadow-glow: rgba(212, 175, 55, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Heiti TC', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1520 50%, #0a0a0a 100%);
}

.smoke-particle {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
    opacity: 0.3;
}

.smoke-particle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.smoke-particle:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 3s;
    animation-duration: 22s;
}

.smoke-particle:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 6s;
    animation-duration: 20s;
}

.smoke-particle:nth-child(4) {
    top: 40%;
    right: 30%;
    animation-delay: 9s;
    animation-duration: 25s;
}

.smoke-particle:nth-child(5) {
    bottom: 40%;
    left: 50%;
    animation-delay: 12s;
    animation-duration: 19s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -50px) scale(1.2);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, -80px) scale(0.8);
        opacity: 0.2;
    }
    75% {
        transform: translate(-40px, -30px) scale(1.1);
        opacity: 0.4;
    }
}

/* Header */
.header {
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

.logo-container {
    text-align: center;
}

.logo {
    height: 60px;
    filter: drop-shadow(0 0 10px var(--shadow-glow));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px var(--shadow-glow));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--shadow-glow)) drop-shadow(0 0 30px var(--shadow-glow));
    }
}

/* Hero Section */
.hero {
    padding: 40px 20px 60px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invitation-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 50px 30px;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 50px rgba(0, 0, 0, 0.5),
        0 0 30px var(--shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0) rotateX(0deg);
    }
    50% {
        transform: translateY(-10px) rotateX(2deg);
    }
}

.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.stamp {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--primary-gold);
    font-size: 50px;
    opacity: 0.3;
    transform: rotate(15deg);
    animation: stampPulse 2s ease-in-out infinite;
}

@keyframes stampPulse {
    0%, 100% {
        transform: rotate(15deg) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: rotate(15deg) scale(1.1);
        opacity: 0.5;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.title-group {
    margin-bottom: 30px;
}

.main-title {
    font-size: 32px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 20px;
}

.text-line {
    display: block;
}

.highlight {
    color: var(--primary-gold);
    text-shadow: 0 0 20px var(--shadow-glow);
    font-size: 36px;
    background: linear-gradient(135deg, var(--gold-light), var(--primary-gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
}

@keyframes textShimmer {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.subtitle {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dim);
    text-align: center;
    font-weight: 300;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.3s;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rules Section */
.rules-section {
    padding: 60px 20px;
}

.section-title {
    font-size: 28px;
    text-align: center;
    color: var(--primary-gold);
    margin-bottom: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    font-size: 32px;
    animation: iconRotate 10s linear infinite;
}

@keyframes iconRotate {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.rule-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(35, 35, 35, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 30px 25px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.rule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(212, 175, 55, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rule-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.rule-card:hover::before {
    opacity: 1;
}

.rule-decoration {
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-gold);
}

.corner.top-left {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

.rule-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: var(--primary-gold);
    opacity: 0.2;
}

.rule-header {
    margin-bottom: 15px;
}

.rule-number {
    display: inline-block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-gold);
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 5px;
}

.rule-content {
    position: relative;
    z-index: 1;
}

.rule-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dim);
}

.flavor-tag {
    color: var(--accent-blue);
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.flavor-tag.special {
    color: var(--accent-purple);
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
}

.flavor-tag.exclusive {
    color: var(--gold-light);
    text-shadow: 0 0 10px var(--shadow-glow);
}

/* Featured Section */
.featured-section {
    padding: 40px 20px 60px;
}

.featured-image-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--shadow-glow) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(212, 175, 55, 0.3);
    display: block;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    font-size: 24px;
    color: var(--primary-gold);
    animation: floatAround 4s ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0.6;
}

.float-icon:nth-child(1) {
    top: 10%;
    left: 10%;
}

.float-icon:nth-child(2) {
    top: 15%;
    right: 15%;
}

.float-icon:nth-child(3) {
    bottom: 20%;
    left: 15%;
}

@keyframes floatAround {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* CTA Section */
.cta-section {
    padding: 60px 20px 80px;
}

.cta-content {
    text-align: center;
    position: relative;
}

.cta-title {
    font-size: 26px;
    color: var(--primary-gold);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.cta-title i {
    font-size: 30px;
    animation: keySwing 2s ease-in-out infinite;
}

@keyframes keySwing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
}

.cta-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.cta-button {
    position: relative;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: var(--bg-dark);
    font-size: 18px;
    font-weight: 700;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 10px 30px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(212, 175, 55, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cta-button:active {
    transform: translateY(-1px);
}

.button-icon {
    font-size: 22px;
    display: flex;
    align-items: center;
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    animation: buttonShine 3s infinite;
}

@keyframes buttonShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.badge-decoration {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 60px;
    color: var(--primary-gold);
    opacity: 0.1;
    animation: badgeSpin 20s linear infinite;
}

@keyframes badgeSpin {
    from {
        transform: translateX(-50%) rotate(0deg);
    }
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

/* Footer */
.footer {
    padding: 40px 20px 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 60px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--primary-gold),
        transparent
    );
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-gold);
    transform: translateY(-2px);
}

.footer-link i {
    font-size: 16px;
}

.footer-separator {
    color: rgba(212, 175, 55, 0.3);
    font-size: 14px;
}

.footer-copyright {
    text-align: center;
    color: rgba(160, 160, 160, 0.6);
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .main-title {
        font-size: 26px;
    }
    
    .highlight {
        font-size: 30px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .invitation-card {
        padding: 40px 25px;
    }
    
    .rule-card {
        padding: 25px 20px;
    }
    
    .rule-icon {
        font-size: 30px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .cta-button {
        font-size: 16px;
        padding: 15px 35px;
    }
}

/* 滚动动画 */
@keyframes scrollFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rule-card {
    animation: scrollFadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.rule-card:nth-child(1) {
    animation-delay: 0.1s;
}

.rule-card:nth-child(2) {
    animation-delay: 0.2s;
}

.rule-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: modalFadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%);
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px var(--shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideUp 0.4s ease-out;
    z-index: 1;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-decoration {
    pointer-events: none;
}

.modal-corner {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 2px solid var(--primary-gold);
}

.modal-corner.tl {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.modal-corner.tr {
    top: 15px;
    right: 15px;
    border-left: none;
    border-bottom: none;
}

.modal-corner.bl {
    bottom: 15px;
    left: 15px;
    border-right: none;
    border-top: none;
}

.modal-corner.br {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

.modal-icon {
    font-size: 60px;
    color: var(--primary-gold);
    margin-bottom: 20px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px var(--shadow-glow));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px var(--shadow-glow));
    }
}

.modal-title {
    font-size: 28px;
    color: var(--primary-gold);
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 0 20px var(--shadow-glow);
}

.modal-message {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 35px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 25px;
    border: 2px solid;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Microsoft JhengHei', sans-serif;
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.modal-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modal-btn i {
    position: relative;
    z-index: 1;
}

.modal-btn span,
.modal-btn-cancel,
.modal-btn-confirm {
    position: relative;
    z-index: 1;
}

.modal-btn-cancel {
    background: transparent;
    border-color: rgba(160, 160, 160, 0.5);
    color: var(--text-dim);
}

.modal-btn-cancel:hover {
    border-color: var(--text-dim);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(160, 160, 160, 0.2);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    border-color: var(--primary-gold);
    color: var(--bg-dark);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.modal-btn-confirm:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
}

.modal-btn-confirm:active {
    transform: translateY(-1px);
}

/* 响应式 - 模态框 */
@media (max-width: 480px) {
    .modal-container {
        padding: 40px 25px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-message {
        font-size: 14px;
    }
    
    .modal-icon {
        font-size: 50px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        min-width: 100%;
    }
}
