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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #393939;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.valentine-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #000000;
    transition: transform 0.3s ease;
}

.valentine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

.card-content {
    text-align: center;
}

.title {
    font-size: 3em;
    color: #000000;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2em;
    color: #333333;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 300;
}

.gender-selector {
    margin-bottom: 30px;
    text-align: left;
}

.gender-label {
    display: block;
    font-size: 1em;
    color: #000000;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.gender-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1em;
    color: #333333;
    font-weight: 400;
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #000000;
}

.radio-label span {
    user-select: none;
}

.generate-btn {
    background: #000000;
    border: 2px solid #000000;
    border-radius: 4px;
    padding: 20px 50px;
    font-size: 1.3em;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    font-weight: 600;
    letter-spacing: 1px;
}

.generate-btn:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

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

.generate-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}


.result {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

.result-content {
    background: #ffffff;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-text {
    font-size: 1.3em;
    color: #000000;
    line-height: 1.8;
    white-space: pre-wrap;
    font-weight: 300;
}

.new-btn {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 4px;
    padding: 15px 40px;
    font-size: 1.1em;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    letter-spacing: 1px;
}

.new-btn:hover {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    border-top-color: #000000;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-section {
    margin-top: 40px;
}

.submit-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #000000;
}

.submit-title {
    font-size: 1.8em;
    color: #000000;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

.submit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.submit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #000000;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    background: #ffffff;
    color: #000000;
}

.submit-textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.submit-btn {
    background: #000000;
    border: 2px solid #000000;
    border-radius: 4px;
    padding: 15px 40px;
    font-size: 1.1em;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    letter-spacing: 1px;
    align-self: center;
}

.submit-btn:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.valentines-list-section {
    margin-top: 40px;
}

.list-title {
    font-size: 1.8em;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

.valentines-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-message {
    text-align: center;
    color: #ffffff;
    font-size: 1.1em;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.valentine-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #000000;
    transition: transform 0.3s ease;
}

.valentine-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

.valentine-item-text {
    font-size: 1.1em;
    color: #000000;
    line-height: 1.8;
    white-space: pre-wrap;
    font-weight: 300;
    margin-bottom: 15px;
}

.valentine-item-date {
    font-size: 0.85em;
    color: #666666;
    text-align: right;
    font-weight: 400;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}

@media (max-width: 600px) {
    .valentine-card {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .generate-btn {
        padding: 15px 30px;
        font-size: 1.1em;
    }
    
    .gender-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .submit-card {
        padding: 20px;
    }
    
    .submit-title {
        font-size: 1.5em;
    }
    
    .list-title {
        font-size: 1.5em;
    }
}
