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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 50%, #fce4ec 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Petals Animation */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    font-size: 24px;
    opacity: 0.7;
    animation: fall linear infinite;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    z-index: 100;
}

.logo-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.control-btn .icon {
    font-size: 24px;
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-box {
    background: white;
    border-radius: 30px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;           
    overflow-y: auto;           
    scroll-behavior: smooth;    
}

@keyframes bloom {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.animate-bloom {
    animation: bloom 0.6s ease-out;
}

.popup-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ec407a, #ab47bc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-desc {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.gender-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gender-btn {
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    color: white;
}

.gender-btn.male {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.gender-btn.female {
    background: linear-gradient(135deg, #ec407a, #e91e63);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
}

.gender-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.gender-icon {
    font-size: 28px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 50px;
    position: relative;
    z-index: 10;
}

.main-title {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ec407a, #ab47bc, #ec407a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.subtitle {
    text-align: center;
    color: #9c27b0;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.quote {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Stats Box */
.stats-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 0 auto 30px;
    max-width: fit-content;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 28px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #ec407a;
}

.stat-label {
    font-size: 16px;
    color: #666;
}

.stat-divider {
    font-size: 28px;
    color: #ccc;
}

/* Water Button */
.water-btn-container {
    text-align: center;
    margin-bottom: 40px;
}

.water-btn {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.4);
    transition: all 0.3s ease;
}

.water-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(67, 160, 71, 0.5);
}

/* Tree Container */
.tree-container {
    max-width: 800px;
    margin: 0 auto 50px;
    position: relative;
}

.tree-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

.tree-trunk {
    animation: growTree 2s ease-out;
}

@keyframes growTree {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}

.tree-branch {
    animation: growBranch 1.5s ease-out 0.5s forwards;
}

@keyframes growBranch {
    from {
        opacity: 0;
        stroke-dasharray: 500;
        stroke-dashoffset: 500;
    }
    to {
        opacity: 1;
        stroke-dasharray: 500;
        stroke-dashoffset: 0;
    }
}

.flower {
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: center;
}

.flower:hover {
    transform: scale(1.3);
    filter: drop-shadow(0 0 10px rgba(236, 64, 122, 0.8));
}

.flower-bloom {
    animation: bloomFlower 0.8s ease-out;
}

@keyframes bloomFlower {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
}

/* Leaderboard */
.leaderboard {
    max-width: 900px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.leaderboard-title {
    font-size: 32px;
    text-align: center;
    color: #9c27b0;
    margin-bottom: 30px;
    font-weight: 800;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #fce4ec, #f3e5f5);
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(156, 39, 176, 0.2);
}

.rank {
    font-size: 24px;
    font-weight: 800;
    color: #9c27b0;
    min-width: 40px;
}

.wish-info {
    flex: 1;
    min-width: 0;
}

.wish-nickname {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.wish-preview {
  color: #666;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;      
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


.hearts-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffebee;
    padding: 10px 20px;
    border-radius: 25px;
    flex-shrink: 0;
}

.hearts-badge span:first-child {
    font-size: 20px;
}

.hearts-count {
    font-weight: 800;
    color: #e91e63;
    font-size: 18px
    }

/* Hashtags */
.hashtags {
    text-align: center;
    color: #ab47bc;
    font-size: 14px;
    line-height: 1.8;
}

/* Wish Form Popup */
.wish-form-box {
    max-width: 550px;
}

.form-title {
    font-size: 28px;
    text-align: center;
    color: #9c27b0;
    margin-bottom: 30px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1bee7;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    max-width: 100%;


}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ab47bc;
    box-shadow: 0 0 0 3px rgba(171, 71, 188, 0.1);
}

.form-textarea {
    min-height: 120px;   
    resize: none;         
    overflow: hidden;      
    transition: height 0.2s ease; 
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-submit,
.btn-cancel {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: linear-gradient(135deg, #ec407a, #ab47bc);
    color: white;
    box-shadow: 0 4px 15px rgba(171, 71, 188, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(171, 71, 188, 0.5);
}

.btn-cancel {
    background: #e0e0e0;
    color: #666;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

/* Wish Card Popup */
.wish-card-box {
    max-width: 500px;
}

.flower-icon-large {
    font-size: 80px;
    text-align: center;
    margin-bottom: 20px;
}

.wish-card-nickname {
    font-size: 26px;
    text-align: center;
    color: #9c27b0;
    margin-bottom: 20px;
    font-weight: 700;
}

.wish-card-text {
    font-size: 18px;
    color: #555;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 30px;

    max-height: 300px;           
    overflow-y: auto;             
    padding-right: 10px;

    white-space: normal;          
    word-wrap: break-word;        
    word-break: break-word;      
    scrollbar-width: thin;
}
.wish-card-text::-webkit-scrollbar {
    width: 6px;
}

.wish-card-text::-webkit-scrollbar-thumb {
    background-color: #d48ee1;
    border-radius: 10px;
}

.wish-card-text::-webkit-scrollbar-thumb:hover {
    background-color: #b56ac6;
}


.wish-card-text::-webkit-scrollbar {
    width: 6px;
}

.wish-card-text::-webkit-scrollbar-thumb {
    background-color: #d48ee1;
    border-radius: 10px;
}

.wish-card-text::-webkit-scrollbar-thumb:hover {
    background-color: #b56ac6;
}

.card-buttons {
    display: flex;
    gap: 15px;
}

.btn-like {
    flex: 1;
    background: linear-gradient(135deg, #ef5350, #ec407a);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.4);
}

.btn-like:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 83, 80, 0.5);
}

.heart-icon {
    font-size: 24px;
}

.btn-close {
    background: #e0e0e0;
    color: #666;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: #d0d0d0;
}

/* Floating Hearts */
#floatingHeartsContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.floating-heart {
    position: absolute;
    font-size: 40px;
    animation: floatUp 2s ease-out;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-150px) scale(1.5);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }

    .stats-box {
        flex-direction: column;
        gap: 10px;
        padding: 15px 25px;
    }

    .stat-divider {
        display: none;
    }

    .popup-box {
        padding: 30px 20px;
    }

    .leaderboard {
        padding: 25px 15px;
    }

    .leaderboard-title {
        font-size: 24px;
    }

    .water-btn {
        font-size: 16px;
        padding: 15px 30px;
    }
    .tree-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

#flowersContainer {
    background: linear-gradient(to top, #fef6f6, #fdfdfd);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(150, 100, 50, 0.2);
}

.flower-bloom {
    animation: bloom 1.5s ease-out;
}

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

}
