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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ff9a9e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 700px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e, #ffb4b4, #ff8e8e, #ff6b6b);
}

.hearts {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

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

h1 {
    text-align: center;
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 2rem;
}

.intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.8;
    font-size: 1.1rem;
}

.intro em {
    color: #e74c3c;
    font-style: italic;
}

.cipher-section, .unlock-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #fafafa;
    border-radius: 15px;
    border: 2px dashed #ffb4b4;
}

h2 {
    color: #c0392b;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.cipher-text {
    background: #2c3e50;
    color: #2ecc71;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
    word-break: break-all;
    margin-bottom: 20px;
}

.decoder label {
    display: block;
    margin-bottom: 10px;
    color: #666;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #e74c3c;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-decode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-decode:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-unlock {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    width: 100%;
}

.btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.decoded-section {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid #2ecc71;
}

.decoded-section h3 {
    color: #27ae60;
    margin-bottom: 10px;
}

.decoded-text {
    color: #2c3e50;
    font-size: 1.2rem;
    line-height: 1.6;
}

.hidden {
    display: none;
}

.unlock-section p {
    color: #666;
    margin-bottom: 15px;
}

.unlock-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
}

.unlock-message.success {
    background: #d4edda;
    color: #155724;
    animation: celebrate 0.5s ease-out;
}

.unlock-message.error {
    background: #f8d7da;
    color: #721c24;
    animation: shake 0.5s ease-out;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Letter page styles */
.letter-card {
    text-align: center;
}

.letter-header {
    margin-bottom: 30px;
}

.seal {
    font-size: 5rem;
    animation: float 3s ease-in-out infinite;
}

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

.letter-content {
    background: linear-gradient(to bottom, #fffef0, #fff);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #e0d6c2;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.letter-content pre {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a4a4a;
    white-space: pre-wrap;
    text-align: left;
}

.letter-footer {
    padding-top: 20px;
}

.hearts-row {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 600px) {
    .card {
        padding: 25px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .cipher-text {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
}
