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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: #ff6b6b;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2em;
    color: #ff8787;
}

.input-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.input-section h2 {
    color: #ff6b6b;
    margin-bottom: 20px;
}

#text-input {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    border: 2px solid #ffd0d0;
    border-radius: 15px;
    font-size: 1em;
    font-family: inherit;
    line-height: 1.8;
    resize: vertical;
    margin-bottom: 20px;
}

#text-input:focus {
    outline: none;
    border-color: #ff6b6b;
}

#photo-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 12px 30px;
    background: #ffd93d;
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
    transition: all 0.3s;
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

button {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

#generate-btn {
    background: #ff6b6b;
    color: white;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.postcard-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.postcard-section h2 {
    color: #ff6b6b;
    margin-bottom: 20px;
    text-align: center;
}

.postcard-content {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe8cc 100%);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.postcard-header {
    text-align: center;
    margin-bottom: 40px;
}

.postcard-title {
    font-size: 2em;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1.5;
    margin-bottom: 10px;
}

.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.memory-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: transform 0.3s;
}

.memory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.memory-text {
    flex: 1;
}

.memory-date {
    font-size: 1.3em;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 12px;
    display: inline-block;
    background: linear-gradient(135deg, #ffe8e8 0%, #ffd0d0 100%);
    padding: 5px 15px;
    border-radius: 20px;
}

.memory-location {
    font-size: 1.05em;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

.memory-location strong {
    color: #ff6b6b;
    font-size: 1.1em;
}

.memory-description {
    font-size: 1em;
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.memory-mood {
    font-size: 0.95em;
    color: #ff8787;
    font-style: italic;
    background: #fff5f5;
    padding: 5px 12px;
    border-radius: 15px;
    display: inline-block;
    margin-top: 5px;
}

.memory-photo {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.postcard-footer {
    text-align: center;
    font-size: 1.1em;
    color: #ff6b6b;
    padding: 20px;
    background: rgba(255,255,255,0.5);
    border-radius: 15px;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .memories-grid {
        grid-template-columns: 1fr;
    }
    
    .memory-card {
        flex-direction: column;
    }
    
    .memory-photo {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
}
