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

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.gift-box-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.gift-box-container.opening {
    /* 余計なアニメーションを削除 */
}

.gift-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 40px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gift-box:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

.gift-box-bottom {
    width: 200px;
    height: 140px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.gift-box-top {
    width: 220px;
    height: 60px;
    background: linear-gradient(135deg, #ff8787, #ff6b6b);
    border-radius: 10px 10px 15px 15px;
    position: absolute;
    top: 0;
    left: -10px;
    z-index: 3;
    transform-origin: top center;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.gift-box.opening .gift-box-top {
    transform: rotateX(-90deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.gift-ribbon-vertical {
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
}

.gift-ribbon-horizontal {
    width: 100%;
    height: 30px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 5px;
}

.gift-bow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
}

.gift-bow::before,
.gift-bow::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 25px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50% 10px 50% 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.gift-bow::before {
    left: -15px;
    transform: rotate(-45deg);
}

.gift-bow::after {
    right: -15px;
    transform: rotate(45deg);
}

.gift-shadow {
    position: absolute;
    bottom: -30px;
    left: 10px;
    width: 180px;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    filter: blur(10px);
    z-index: 1;
}

.gift-text {
    text-align: center;
    color: white;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.gift-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gift-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.open-gift-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.open-gift-btn:hover {
    background: white;
    color: #764ba2;
    transform: scale(1.05);
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gift-box.opening {
    /* 余計なアニメーションを削除 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    transform-origin: center center;
}

.hero-section {
    position: relative;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.hero-photo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    animation: photoFadeIn 2s ease-out both;
}

.hero-kuroki-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-kuroki-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.hero-photo-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid transparent;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: frameGlow 3s ease-in-out infinite 1s;
}

.hero-title {
    animation: fadeInScale 1.5s ease-out 0.5s both;
}

.title-main {
    display: block;
    font-size: 4rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.title-name {
    display: block;
    font-size: 3rem;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #fff;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.balloon-container {
    position: absolute;
    bottom: 0;
    opacity: 1;
}

.balloon {
    position: relative;
    width: 60px;
    height: 80px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 12px solid currentColor;
    filter: brightness(0.8);
}

.balloon-string {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 150px;
    z-index: 1;
    transform-origin: top center;
}

.balloon-string path {
    transform-origin: 50px 0;
}

.balloon-container-1 {
    left: 10%;
    animation: balloonFloat 9s linear infinite 0.5s both;
    transform: translateY(20vh) translateX(0px) rotate(0deg);
}

.balloon-container-1 .balloon {
    background: linear-gradient(145deg, #ff6b6b, #ee5a52);
    color: #ee5a52;
}

.balloon-container-2 {
    left: 25%;
    animation: balloonFloat 9s linear infinite 3.2s both;
    transform: translateY(20vh) translateX(0px) rotate(0deg);
}

.balloon-container-2 .balloon {
    background: linear-gradient(145deg, #4ecdc4, #45b7aa);
    color: #45b7aa;
}

.balloon-container-3 {
    left: 45%;
    animation: balloonFloat 9s linear infinite 6.1s both;
    transform: translateY(20vh) translateX(0px) rotate(0deg);
}

.balloon-container-3 .balloon {
    background: linear-gradient(145deg, #ffe66d, #ffd93d);
    color: #ffd93d;
}

.balloon-container-4 {
    left: 65%;
    animation: balloonFloat 9s linear infinite 2.3s both;
    transform: translateY(20vh) translateX(0px) rotate(0deg);
}

.balloon-container-4 .balloon {
    background: linear-gradient(145deg, #a8e6cf, #88ddb5);
    color: #88ddb5;
}

.balloon-container-5 {
    left: 80%;
    animation: balloonFloat 9s linear infinite 4.8s both;
    transform: translateY(20vh) translateX(0px) rotate(0deg);
}

.balloon-container-5 .balloon {
    background: linear-gradient(145deg, #ff8cc8, #ff69b4);
    color: #ff69b4;
}

@keyframes balloonFloat {
    0% {
        transform: translateY(20vh) translateX(0px) rotate(0deg);
        opacity: 1;
    }
    10% {
        transform: translateY(0vh) translateX(25px) rotate(2deg);
    }
    20% {
        transform: translateY(-20vh) translateX(-20px) rotate(-1deg);
    }
    30% {
        transform: translateY(-40vh) translateX(35px) rotate(1.5deg);
    }
    40% {
        transform: translateY(-60vh) translateX(-15px) rotate(-0.8deg);
    }
    50% {
        transform: translateY(-80vh) translateX(30px) rotate(1.2deg);
    }
    60% {
        transform: translateY(-100vh) translateX(-25px) rotate(-1.5deg);
    }
    70% {
        transform: translateY(-120vh) translateX(28px) rotate(0.5deg);
    }
    80% {
        transform: translateY(-140vh) translateX(-18px) rotate(-1deg);
    }
    90% {
        transform: translateY(-160vh) translateX(15px) rotate(0.8deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-180vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
}

.balloon-container:hover {
    animation-play-state: paused;
}

.balloon-container:hover {
    animation-play-state: paused;
}

.balloon-container:hover .balloon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes photoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes frameGlow {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.9;
    }
}

.messages-section {
    padding: 80px 20px;
    background: #f8f9fa;
}

.messages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.personal-message {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.personal-message:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.message-author {
    font-weight: bold;
    color: #764ba2;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.message-text {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

.special-message {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px solid rgba(118, 75, 162, 0.2);
}

.special-message .message-author {
    font-size: 1.3rem;
    color: #667eea;
}

.special-message .message-text {
    font-size: 1.1rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    color: #764ba2;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 20px auto;
    border-radius: 2px;
}



.celebration-section {
    padding: 80px 20px;
    background: white;
    text-align: center;
}

.cake-container {
    display: inline-block;
    position: relative;
}

.cake {
    position: relative;
    width: 300px;
    margin: 0 auto 40px;
}

.cake-layer {
    width: 100%;
    border-radius: 10px;
    margin: 0 auto;
}

.layer-1 {
    height: 60px;
    background: #8b4513;
    width: 100%;
}

.layer-2 {
    height: 60px;
    background: #d2691e;
    width: 80%;
    margin: 0 auto;
}

.layer-3 {
    height: 60px;
    background: #ff69b4;
    width: 60%;
    margin: 0 auto;
}

.candles {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
}

.candle {
    width: 15px;
    height: 40px;
    background: #fffacd;
    position: relative;
}

.flame {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 25px;
    background: radial-gradient(circle, #ffa500, #ff4500);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.5s ease-in-out infinite alternate;
}

@keyframes flicker {
    0% {
        transform: translateX(-50%) scale(1) rotate(-2deg);
    }
    100% {
        transform: translateX(-50%) scale(1.1) rotate(2deg);
    }
}

.celebrate-btn {
    padding: 15px 40px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.celebrate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.celebrate-btn:active {
    transform: scale(0.98);
}

.footer {
    padding: 40px 20px;
    background: #2c3e50;
    color: white;
    text-align: center;
}

.footer-date {
    margin-top: 10px;
    font-size: 1.2rem;
    color: #ffd700;
}

#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-name {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .messages-grid {
        grid-template-columns: 1fr;
    }
    
    .cake {
        width: 250px;
    }
    
    .celebrate-btn {
        font-size: 1.1rem;
        padding: 12px 30px;
    }
    
    .gift-box {
        width: 160px;
        height: 160px;
    }
    
    .gift-box-bottom {
        width: 160px;
        height: 112px;
    }
    
    .gift-box-top {
        width: 176px;
        height: 48px;
    }
    
    .gift-title {
        font-size: 2rem;
    }
    
    .gift-subtitle {
        font-size: 1rem;
    }
    
    .open-gift-btn {
        font-size: 1rem;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    .title-main {
        font-size: 2rem;
    }
    
    .title-name {
        font-size: 1.5rem;
    }
    
    .personal-message {
        padding: 20px;
    }
    
    .message-text {
        font-size: 0.95rem;
    }
    
    .gift-box {
        width: 140px;
        height: 140px;
    }
    
    .gift-box-bottom {
        width: 140px;
        height: 98px;
    }
    
    .gift-box-top {
        width: 154px;
        height: 42px;
    }
    
    .gift-title {
        font-size: 1.8rem;
    }
}