/* ==========================================
   style.css - ទំព័រស្នេហា
   ពណ៌ស្នេហា និងរចនាបទពិសេស
   ========================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Khmer', sans-serif;
    background: linear-gradient(135deg, 
        #ff9a9e 0%, 
        #fad0c4 50%, 
        #fad0c4 50%, 
        #a1c4fd 100%);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Header */
.love-header {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, 
        rgba(255, 107, 139, 0.9), 
        rgba(255, 142, 83, 0.9));
    border-radius: 25px;
    margin-bottom: 40px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(255, 107, 139, 0.3);
    backdrop-filter: blur(10px);
}

.love-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.1) 1px, 
        transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
    z-index: -1;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

.love-title {
    font-family: 'Dancing Script', cursive;
    font-size: 4.5rem;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

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

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
    color: #ff4757;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.love-subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.current-date {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 25px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 15px;
    backdrop-filter: blur(5px);
}

.current-date i {
    margin-right: 10px;
}

/* Love Timer */
.love-timer {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 25px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 2px solid rgba(255, 107, 139, 0.2);
}

.love-timer h2 {
    color: #ff6b8b;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 600;
}

.love-timer h2 i {
    margin-right: 15px;
    color: #ff4757;
}

.counter {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.time-unit {
    background: linear-gradient(135deg, 
        #ffd166 0%, 
        #ffb347 100%);
    padding: 25px 15px;
    border-radius: 15px;
    min-width: 120px;
    color: white;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(255, 180, 70, 0.3);
    transition: transform 0.3s ease;
}

.time-unit:hover {
    transform: translateY(-10px);
}

.time-unit span {
    font-size: 3rem;
    display: block;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.time-unit small {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 5px;
    display: block;
}

.btn-set-date {
    background: linear-gradient(135deg, 
        #06d6a0 0%, 
        #118ab2 100%);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(6, 214, 160, 0.3);
}

.btn-set-date:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(6, 214, 160, 0.4);
}

.btn-set-date i {
    margin-right: 10px;
}

/* Love Messages */
.love-messages {
    margin-bottom: 40px;
}

.love-messages h2 {
    color: #ff6b8b;
    margin-bottom: 30px;
    font-size: 2.2rem;
    text-align: center;
}

.love-messages h2 i {
    margin-right: 15px;
    color: #ff4757;
}

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

.message-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border-top: 5px solid #ff6b8b;
}

.message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, 
        #ff6b8b, #ff8e53, #ffd166);
}

.message-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 107, 139, 0.15);
}

.message-icon {
    font-size: 2.5rem;
    color: #ff6b8b;
    margin-bottom: 20px;
}

.message-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.message-card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.message-date {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Memory Gallery */
.memory-gallery {
    margin-bottom: 40px;
}

.memory-gallery h2 {
    color: #ff6b8b;
    margin-bottom: 30px;
    font-size: 2.2rem;
    text-align: center;
}

.memory-gallery h2 i {
    margin-right: 15px;
    color: #ff4757;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.memory-item {
    border-radius: 20px;
    overflow: hidden;
    height: 250px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.memory-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.memory-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.memory-item:hover img {
    transform: scale(1.1);
}

.memory-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    text-align: center;
    font-size: 1.1rem;
}

.memory-item:hover .memory-caption {
    transform: translateY(0);
}

/* Love Form */
.love-form-section {
    background: linear-gradient(135deg, 
        rgba(6, 214, 160, 0.95), 
        rgba(17, 138, 178, 0.95));
    padding: 50px;
    border-radius: 25px;
    color: white;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(6, 214, 160, 0.2);
}

.love-form-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-family: 'Dancing Script', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.love-form-section h2 i {
    margin-right: 15px;
    color: #ffd166;
}

.love-form {
    max-width: 800px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 1.1rem;
}

.form-group label i {
    margin-right: 10px;
    color: #ffd166;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Noto Sans Khmer', sans-serif;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffd166;
    box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.3);
    background: white;
}

.form-group textarea {
    height: 180px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(135deg, 
        #ff6b8b 0%, 
        #ff4757 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: block;
    margin: 40px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 139, 0.3);
}

.submit-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(255, 107, 139, 0.4);
}

.submit-btn i {
    margin-right: 10px;
}

/* Footer */
.love-footer {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.9), 
        rgba(30, 30, 30, 0.9));
    color: white;
    border-radius: 25px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.love-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        #ff6b8b, #ff8e53, #ffd166, #06d6a0, #118ab2);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-family: 'Dancing Script', cursive;
    color: #ff6b8b;
}

.footer-content h3 i {
    margin-right: 15px;
}

.footer-content > p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-style: italic;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
}

.footer-icon {
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.footer-icon:hover {
    color: #ff6b8b;
    transform: translateY(-5px) scale(1.1);
    background: white;
    box-shadow: 0 5px 15px rgba(255, 107, 139, 0.3);
}

.copyright {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.love-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: #ffd166;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .love-title {
        font-size: 3rem;
    }
    
    .love-subtitle {
        font-size: 1.1rem;
    }
    
    .love-timer h2,
    .love-messages h2,
    .memory-gallery h2 {
        font-size: 1.8rem;
    }
    
    .counter {
        gap: 15px;
    }
    
    .time-unit {
        min-width: 90px;
        padding: 20px 10px;
    }
    
    .time-unit span {
        font-size: 2.2rem;
    }
    
    .messages-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .memory-item {
        height: 200px;
    }
    
    .love-form-section {
        padding: 30px;
    }
    
    .love-form-section h2 {
        font-size: 2rem;
    }
    
    .footer-icons {
        gap: 15px;
    }
    
    .footer-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .love-title {
        font-size: 2.5rem;
    }
    
    .counter {
        flex-direction: column;
        align-items: center;
    }
    
    .time-unit {
        width: 80%;
    }
    
    .btn-set-date,
    .submit-btn {
        width: 100%;
        text-align: center;
    }
}
